-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Checkbox: fix disabled styles #77132
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
Changes from all commits
620c69e
c606d0b
52558bb
bb41a7c
96d5636
1137a0b
c63097e
da276f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,15 +17,17 @@ | |
| .components-checkbox-control__label { | ||
| // Ensure label is aligned with checkbox along X axis | ||
| line-height: var(--checkbox-input-size); | ||
| cursor: pointer; | ||
|
|
||
| .components-checkbox-control:not(:has(:disabled)) & { | ||
| cursor: pointer; | ||
| } | ||
|
Comment on lines
+21
to
+23
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tweaking the set up here so it works better with #76786. |
||
| } | ||
|
|
||
| .components-checkbox-control__input[type="checkbox"] { | ||
| @include checkbox-control; | ||
| background: $white; | ||
| color: $gray-900; | ||
| clear: none; | ||
| cursor: pointer; | ||
| display: inline-block; | ||
| line-height: 0; | ||
| margin: 0 $grid-unit-05 0 0; | ||
|
|
@@ -46,12 +48,15 @@ | |
| @include button-style-outset__focus(var(--wp-admin-theme-color)); | ||
| } | ||
|
|
||
| &:checked, | ||
| &:indeterminate { | ||
| &:not(:disabled):is(:checked, :indeterminate) { | ||
| background: $components-color-accent; | ||
| border-color: $components-color-accent; | ||
| } | ||
|
|
||
| &:not(:disabled) { | ||
| cursor: pointer; | ||
| } | ||
|
|
||
| &:checked::before { | ||
| content: none; | ||
| } | ||
|
|
@@ -88,6 +93,13 @@ svg.components-checkbox-control__indeterminate { | |
| } | ||
| } | ||
|
|
||
| .components-checkbox-control:has(:disabled) { | ||
| svg.components-checkbox-control__checked, | ||
| svg.components-checkbox-control__indeterminate { | ||
| fill: $components-color-gray-400; | ||
| } | ||
| } | ||
|
|
||
| .components-checkbox-control__help { | ||
| display: inline-block; | ||
| margin-inline-start: calc(var(--checkbox-input-size) + var(--checkbox-input-margin)); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,7 +60,7 @@ | |
| opacity: 1; // Override style from wp-admin forms.css. | ||
|
|
||
| &:checked::before { | ||
| border-color: $components-color-gray-300; | ||
| border-color: $components-color-gray-400; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bumping this up a notch in |
||
| opacity: 1; // Override style from wp-admin forms.css. | ||
|
|
||
| } | ||
|
|
||
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.
Fixup