-
Notifications
You must be signed in to change notification settings - Fork 4.7k
RadioControl: Use CSS-in-JS #26294
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
RadioControl: Use CSS-in-JS #26294
Conversation
packages/components/src/radio-control/styles/radio-control-styles.js
Outdated
Show resolved
Hide resolved
ItsJonQ
left a comment
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.
@saramarcondes Haiii! I left a suggestion for verbose box-shadow vs Prettier 😂
packages/components/src/radio-control/styles/radio-control-styles.js
Outdated
Show resolved
Hide resolved
|
@saramarcondes We're starting to venture into components that require references to the I left some more thoughts here: I don't think there's a good solution yet, other than to manually hardcode the fallbacks 🙈 We could create a "mixin" that can output the property for use.. something like: That's kind of how you'd do it in Sass. I really don't like this solution. It's quite limited (e.g. handling multiple values) and feels... too abstract. But it is an option if we don't want to hand-write fallbacks. Would love your thoughts! |
|
@ItsJonQ Shall we compromise and update css`
color: blue;
color: var( --... );
`;I think that might be a better option than trying to come up with a new solution for this when hopefully we could find an already baked one? |
|
@saramarcondes We can certainly give that a shot 🎉 |
|
I'll update this in the FormToggle PR as it's older and I'm hoping to get it merged sooner 🙂 |
|
Closing in favor of focusing on G2-components integration. |
Description
Use CSS-in-JS for
RadioControl.Note: I discovered a bug documented here while working on this: #26293. This is a pre-existing bug that I'm not sure exactly how to fix. I think it should be done in the context of a separate pull request once this one is merged and once there is an answer about the intention for the radio control in the bug issue.
How has this been tested?
Verified there are no differences between this branch and production in Storybook. Also checked in Gutenberg itself.
Types of changes
Non-breaking CSS-in-JS refactor. All classnames are preserved allowing folks to continue targeting the classes that were already there.
Checklist: