Repository navigation
Keep the checked look on disabled toggle buttons - #43350
Merged
Merged
Conversation
✅ Deploy Preview for twbs-bootstrap ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
A disabled .btn-check took the disabled colors even when its input was checked. The rule came after the checked rule with the same specificity, so it won. A group of disabled radios then showed no selected option. The disabled rule now keeps pointer-events, opacity and box-shadow for every disabled toggle. It applies the disabled colors only when the input is not checked.
Show that the checked option remains visible when all radios are disabled.
mdo
force-pushed
the
fix/btn-check-disabled-checked
branch
from
November 20, 2026 18:41
626021e to
9aea83c
Compare
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.
.btn-checktook the disabled colors even when its input was checked. The disabled rule came after the checked rule with the same specificity, so it won. In a group of disabled radios, no option looked selected..btn-check:has(input:disabled)now keeps onlypointer-events,opacityandbox-shadow. The disabled colors move to.btn-check:has(input:disabled):not(:has(input:checked))..btn-check:disabled + .btnchanged only the opacity. Unchecked disabled toggles do not change.Computed styles in Chromium, built from
mainand from this branch (radio group from the issue,.btn-outline.theme-secondary):maintransparent, opacity 0.65oklch(0.828 0.005 245), opacity 0.65 (same as enabled checked)transparent, opacity 0.65npm run css-lintandnpm run css-testpass.Fixes #43348