-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[base-ui] Change the Mui-
class prefix
#39467
Comments
mui-
class prefixMui-
class prefix
I'm reopening to keep track of #40205 (comment). I think that each breaking change is important, and deserves to be covered in depth on why of each change (helps build trust with developers).
Effectively, I don't understand:
Side thought 1. The change to remove the Mui prefix makes sense to me in the strategy to teach developers and make them aware of what they are working with. For instance, if a developer relies a lot on the class names to know which component you can override in the theme (how I would use it), then Base UI using Mui in the class names is horrible DX. Side thought 2. A quick benchmark:
I wonder if we even need class names on slots (we need pseudo-states) Isn't this annoying for a developer who wants to work headless? There are no class names on a |
Yes, this is being discussed in https://www.notion.so/mui-org/base-ui-Style-hooks-e943c3051ca74ce79f2e5af98a0f43eb |
Closing the issue as Base UI does not use classes anymore. |
To allow Base UI components to be styled with plain CSS and coexist with Material UI components in the same projects, we need to be able to differentiate between them.
According to #33260 (comment), the preferred solution was to add a product-specific class name to Base UI components (such as
Mui-Base
), so , for example, the resulting classes on a disabled button would beMui-Base MuiButton-root Mui-disabled
.However, as we're considering decoupling Base UI from the MUI umbrella, we can also reconsider the class name pattern (especially that
{productName}{componentName}
was voted for only slightly less than the winning option).The text was updated successfully, but these errors were encountered: