- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 32.7k
Closed
Labels
customization: themeHigher level theming customizability.Higher level theming customizability.type: regressionA bug, but worse, it used to behave as expected.A bug, but worse, it used to behave as expected.v6.x
Milestone
Description
Steps to reproduce
Link to live example: https://codesandbox.io/p/sandbox/old-sunset-42dgnh?file=%2Fsrc%2FDemo.tsx%3A19%2C52
Steps:
- Go to Demo.tsx. This contains a little spacingcustomization for theme creation (so that we could call something liketheme.spacing('xs')in downstream client).
- Comment/Uncomment cssVariables: trueline. The goal is to switch theme creation between Non CSS Vars <> With CSS Vars theme
- Observe the change in height
Screen.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
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.
Search keywords: v6, customization, spacing
Metadata
Metadata
Assignees
Labels
customization: themeHigher level theming customizability.Higher level theming customizability.type: regressionA bug, but worse, it used to behave as expected.A bug, but worse, it used to behave as expected.v6.x
Projects
Status
Done