IBX-12418: Centred choice input rows on the checkbox, not its wrapper - #142
Open
tischsoic wants to merge 2 commits into
Open
IBX-12418: Centred choice input rows on the checkbox, not its wrapper#142tischsoic wants to merge 2 commits into
tischsoic wants to merge 2 commits into
Conversation
`.ids-choice-input-field__input-wrapper` is a block box inheriting the 21px line height, so the 16px inline checkbox sat in a 21.5px line box and its centre fell 2.75px below the wrapper's. `align-items: center` on the row centres that wrapper, not the control, so every CheckboxField and RadioButtonField label sat off-centre against its input. Making the wrapper a flex box shrinks it to the control. Co-Authored-By: Claude <noreply@anthropic.com>
Chrome's UA stylesheet gives checkboxes `margin: 3px 3px 3px 4px` and radios `margin: 3px 3px 0 5px`; with the wrapper now hugging the control, the radio's asymmetric margin put its centre 1.5px off the label's. The back office never showed this because Bootstrap's reboot zeroes input margins; the design system should not depend on that. Co-Authored-By: Claude <noreply@anthropic.com>
albozek
approved these changes
Sep 3, 2026
GrabowskiM
approved these changes
Sep 4, 2026
dew326
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related PRs:
Description:
.ids-choice-input-field__input-wrapperis a block box inheriting the 21px line height, so a 16px inline checkbox sits in a 21.5px line box with its centre 2.75px below the wrapper's.align-items: centeron the row centres that wrapper rather than the control, leaving everyCheckboxField/RadioButtonFieldlabel off-centre. Making the wrapper a flex box shrinks it to the control.Second commit: with the wrapper hugging the control, Chrome's UA margins on the inputs become visible — checkbox
3px 3px 3px 4px(symmetric, harmless), radio3px 3px 0 5px(1.5px off). The back office never showed it because Bootstrap's reboot zeroes input margins; the design system shouldn't rely on that, sochoice-input-basenow resetsmargin: 0. No change in the back office.Needs #136 as well — it removes the 9px bottom margin on
.ids-choice-input-label, which offsets the row the other way. Label centre − input centre, measured:Checkedstory,main+ #136Checkedstory,main+ #136 + this PRFor QA:
Storybook
CheckboxField/RadioButtonFieldCheckedstories, or Content structure → ⋮ → Send to trash: the label text must be vertically centred against the box, and the box flush with the row's left edge.Documentation: