-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[docs-infra] Support CSS variables API info #44559
Conversation
Netlify deploy previewhttps://deploy-preview-44559--material-ui.netlify.app/ Bundle size report |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
I don't have solution for now, but we should find a way to let others now that this feature relies on some assumptions:
- The matching relies on [ComponentName]CssVars
- The variables names are generated with
--${kamelCase(propName)}
so you can't create aaccordionCssVars
without following this convention
Agree, this should be communicated (I am handling the first PR on Base UI's side). I followed the convention I started for the hooks here (there we expect HookNameParams & HookNameReturnValue as types to exists)
On Base UI, I created util for generating the CSS variables, similar to the generateUtilityClasses, see https://github.com/mui/base-ui/pull/874/files#diff-8754fb58432b15f7eb3117b38ed67724d2b667f784e70ac32700ee7ad2957479R1. This will avoid doing typos or making the CSS variables names inconsistent |
Needed for generating CSS variables in the Base UI's API tables, see mui/base-ui#874
The changes in the Joy UI's Accoridon component are just for testing, I will revert those in the end.