-
-
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
[material-ui] Spacing customization not working on 6.0.0-beta.6 when enabling CSS variables #43378
Comments
At first glance, maybe this comes from
somehow |
With CSS variables enabled, what behavior of |
We have that In reality we have more scales than just |
Note that with this fix, when a custom spacing function is provided, a CSS variable for spacing will not be generated. |
@siriwatknp thanks for your quick reactivity 💯 |
Steps to reproduce
Link to live example: https://codesandbox.io/p/sandbox/old-sunset-42dgnh?file=%2Fsrc%2FDemo.tsx%3A19%2C52
Steps:
spacing
customization for theme creation (so that we could call something liketheme.spacing('xs')
in downstream client).cssVariables: true
line. The goal is to switch theme creation between Non CSS Vars <> With CSS Vars themeScreen.Recording.2024-08-20.at.12.27.14.mov
Current behavior
With MUI version 6.0.0-beta.6, switching to CSS Vars theme doesn't take into account spacing customization.
I didn't try with MUI v5 as CSS Vars theming seems to be unstable there.
Expected behavior
With MUI version 6.0.0-beta.6, switching to CSS Vars theme should take into account spacing customization.
Context
We are migrating to MUI v6 (+ CSS Vars support) and our frontend infra flags this difference.
Your environment
npx @mui/envinfo
Search keywords: v6, customization, spacing
The text was updated successfully, but these errors were encountered: