fix(webkit): keep switch chrome intact inside an input-group - #843
Open
gabriel-lisboa-azion wants to merge 1 commit into
Open
fix(webkit): keep switch chrome intact inside an input-group#843gabriel-lisboa-azion wants to merge 1 commit into
gabriel-lisboa-azion wants to merge 1 commit into
Conversation
InputGroup flattens the chrome of the controls it wraps — transparent borders, square corners — so its segments read as one field. A Switch is also a <button> but is not a segment: it draws a pill with its own border and radius, and the blanket [&_button] selectors erased both with !important, leaving a grey rectangle with a floating thumb. Both selectors are now scoped with :not([role=switch]) — the role switch.vue already sets — so every other button flattens exactly as before.
herbert-julio-azion
approved these changes
Jul 31, 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.
What
InputGroup's button-flattening selectors now skip aSwitch.Why
InputGroupdeliberately flattens the chrome of the controls it wraps — transparent borders and square corners — so a group of segments reads as one field with internal dividers. That is right for a trailingButton, anIconButtonor a combobox trigger.A
Switchis also a<button>, but it is not a segment of the field: it renders a pill (rounded-[var(--shape-elements)],h-5 w-9,border-[var(--border-default)], anddata-[checked]:border-transparentfor its own checked state). The blanket[&_button]selectors squared its corners and erased its border with!important, so a switch placed inside a group rendered as a small grey rectangle with a floating thumb — the control still worked but no longer looked like a switch.Scoping the two selectors with
:not([role=switch])(the roleswitch.vuealready sets on its root) leaves every other button flattened exactly as before and hands the switch its own chrome back.Scope
Two selectors on one class string. No props, events, slots or tokens change, and no other control matches
[role=switch].