question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[RFC] Change usage of the term "pseudo-class" across documentation

See original GitHub issue

Summary 💡

Change the term “pseudo-class” to “conditional class” when referring to classes such as Mui-disabled, Mui-checked, etc.

Motivation 🔦

The discussion started in https://github.com/mui-org/material-ui/pull/26688/files#r659219539.

The term “pseudo-class” has a well-known meaning in context of CSS. The classes that we apply to components in certain states are technically ordinary CSS classes (and should be targeted using ., not : as CSS pseudo-classes).

These classes, however, have a special meaning in context of Material-UI. They should not be styled directly, but only with the corresponding “static” classes. To emphasize the difference between these classes and the ones that are applied to elements regardless of their state (such as MuiButton-root, I propose to use the term “conditional classes”.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

7reactions
michaldudakcommented, Jul 26, 2021

Let’s vote for the options:

🚀 conditional classes ❤ common classes 👀 shared classes 🎉 state classes 😕 pseudoclasses

1reaction
oliviertassinaricommented, Jul 27, 2021

I have voted for “state classes” because the MDN docs of a :pseudo-class uses

A CSS pseudo-class is a keyword added to a selector that specifies a special state of the selected element(s).

I also think that it matches with the Bootstrap terminology, where if we apply to us, we get:

  • .MuiButton-root: is a base class (we have one per element)
  • .MuiButton-outlined: is a modifier class (we get one per specific variation of the styles). Maybe we could call this a variant class for consistency with theme.components.MuiXX.variants.
  • .Mui-disabled: is a state class (we get one for the most important states)
Read more comments on GitHub >

github_iconTop Results From Across the Web

[RFC] Change usage of the term "pseudo-class ... - GitHub
Summary Change the term "pseudo-class" to "conditional class" when referring to classes such as Mui-disabled, Mui-checked, etc.
Read more >
Pseudo-classes - CSS: Cascading Style Sheets | MDN
A CSS pseudo-class is a keyword added to a selector that specifies a special state of the selected element(s). For example, the pseudo-class...
Read more >
Selectors Level 4 - W3C
This structure can be used as a condition (e.g. in a CSS rule) that determines which elements a selector matches in the document...
Read more >
Cascading Style Sheets (CSS) Requirements for RFCs
This document describes the requirements for the default CSS used by the ... a definition list; align terms and definitions along left side....
Read more >
RFC Status Changes - » RFC Editor
Number Title Publication Status Status RFC 20 ASCII format for network interchange UNKNOWN INTER... RFC 652 Telnet output carriage‑return disposition option PROPOSED STANDARD HISTO... RFC 653...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found