Skip to content
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][Slider] Refactor style to use CSS variables #43900

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

albarv340
Copy link
Contributor

Closes #38981

@mui-bot
Copy link

mui-bot commented Sep 27, 2024

Netlify deploy preview

https://deploy-preview-43900--material-ui.netlify.app/

@material-ui/core: parsed: +0.22% , gzip: +0.13%

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against e94a6b4

@albarv340
Copy link
Contributor Author

albarv340 commented Sep 27, 2024

I tried to follow Joy UI's implementation, but also deviated quite a bit from it. I removed a memoTheme to get access to ownerState, in the same way as Joy UI, but I am not sure if it is the solution we want to go with. I could go back to the props based solution, if that is preferred. I tried the Joy UI way with ownerState, but it caused builds to fail, so I stayed on the memoTheme with props solution. Furthermore, I also made some assumptions about relations between variables and the magic constants currently present, which might require some looking over. For the SliderMarkLabel I did not see any clear correlations, except for maybe the left property aligning with the paddingRight from root on the vertical variant, so I just left the values as constants for now, but that should likely be changed.

@albarv340 albarv340 changed the title [Slider][material-ui] Refactor style to use CSS variables [material-ui][Slider] Refactor style to use CSS variables Sep 27, 2024
@zannager zannager added the component: slider This is the name of the generic UI component, not the React module! label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: slider This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Slider][material-next] Refactor style to use CSS variables
3 participants