mirror of
https://github.com/picocss/pico.git
synced 2025-04-23 01:46:14 -04:00
refactor: disabled checkboxes and radios without :has
This commit is contained in:
parent
e022c7098e
commit
dd799056c7
2 changed files with 6 additions and 15 deletions
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
// Labels
|
||||
// Not working in Firefox, which doesn't support the `:has()` pseudo-class
|
||||
label {
|
||||
&:has([type="checkbox"], [type="radio"]) {
|
||||
width: fit-content;
|
||||
|
@ -14,21 +15,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Disabled labels
|
||||
label:has([disabled]),
|
||||
[type="checkbox"][disabled] + label,
|
||||
[type="radio"][disabled] + label {
|
||||
opacity: var(#{$✨}form-element-disabled-opacity);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
label:has([disabled]) {
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
opacity: initial;
|
||||
}
|
||||
}
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
-webkit-appearance: none;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue