-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
fix(RadioControl): checked style outside of Gutenberg #30670
Conversation
Size Change: +14 B (0%) Total Size: 1.43 MB
ℹ️ View Unchanged
|
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.
Like all good ointments, apply box-sizing liberally to the affected area. Ship it and thank you.
Thanks @jasmussen! Feels good to kick the tires on a PR again, even if only a small one 😄 |
The smaller, the better, in my experience! Thanks for the work! 👌 |
Thanks for this fix! We just noticed this helps resolve the same rendering issue with the |
Description
When used outside of Gutenberg, the style for a selected radio button in a
RadioControl
does not work correctly:This is because the
::before
pseudo-element is depending on abox-sizing: inherit
which is applied only if the radio is wrapped by a container with one of several class names:(Pictured left:
RadioControl
outside of Gutenberg; Pictured right:RadioControl
inside of Gutenberg.)Applying the
box-sizing
property at the component level resolves the issue:Notably, the
CheckboxControl
is unaffected by this issue because it uses a positioned SVG icon rather than drawing a shape in CSS.How has this been tested?
Visual test using component outside of Gutenberg
Screenshots
see above
Types of changes
scoped CSS change
Checklist:
*.native.js
files for terms that need renaming or removal).