-
Notifications
You must be signed in to change notification settings - Fork 21
chore(docs, styles): add .form-check-sm class to htmlcss radio button and add size variant on stories
#6805
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
base: main
Are you sure you want to change the base?
Conversation
…`.form-check-sm` css class to styles
🦋 Changeset detectedLatest commit: 2f3add2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
You can see in the screenshot (desktop) that the small version has the radio misaligned with the text.
You can go through the checklist of the ticket to make sure you've not forgotten any task. The last element "Design review" should be done by a designer: Once you've reviewed the design yourself to make sure what you've implemented looks the same as on figma, you can contact Sandra and ask her to review the small version of the component.

…cal (default) and horizontal (inline)
…zontal default, vertical default, horizontal small, vertical small)
|
Design Review
I see that this has been missed to tokenize. I will therefore add the missing token. |
packages/documentation/src/stories/components/radio/radio.snapshot.stories.ts
Outdated
Show resolved
Hide resolved
packages/documentation/src/stories/components/radio/radio.snapshot.stories.ts
Outdated
Show resolved
Hide resolved
| fieldset .form-check-sm:not(.form-switch, .form-check-inline, :last-of-type) { | ||
| display: flex; | ||
| align-items: center; | ||
| margin-block-end: tokens.get('radio-button-small-group-items-gap-block'); |
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.
If you inspect the CSS, you can see that the margin-bottom set on the .form-check in the file _form-check.scss is overriding the margin-block-end you've defined for the .form-check-sm, meaning the gap between small elements within a fieldset is not correct.
When applying a property on an element, it's always good to use the inspector to make sure it is correctly applied, especially when the difference it brings might be hard to see.

packages/documentation/src/stories/components/radio/radio.stories.ts
Outdated
Show resolved
Hide resolved
… counter for radio snapshots
|



📄 Description
The CSS
.form-check-smclass is added to the Form Radio Button component. The variantSizehas been added on the component's documentation.🚀 Demo
For Radio Button

For Radio Group

🔮 Design review
📝 Checklist