Make [disabled] and [hidden] styles !important

This commit is contained in:
2026-03-03 01:14:12 +01:00
parent 83b064ef3c
commit c659201904

View File

@@ -53,6 +53,20 @@
:focus-visible { :focus-visible {
outline: none; outline: none;
} }
/* NOTE: move to higher priority layer instead of using !important? */
[disabled] {
border-color: var(--color-border-gray) !important;
color: var(--color-border-gray) !important;
/* NOTE: cannot set cursor with `pointer-events: none`; can be fixed by setting
* cursor on wrapping element.
cursor: not-allowed; */
fill: var(--color-border-gray) !important;
pointer-events: none !important;
}
/* [hidden] submit elements cannot have `display` set as it makes them visible. */
[hidden] {
display: none !important;
}
/* Color coding of input controls' background: /* Color coding of input controls' background:
@@ -80,10 +94,9 @@ input[type=submit] {
text-decoration: none; text-decoration: none;
white-space: nowrap; white-space: nowrap;
} }
/* [hidden] submit controls cannot have `display` set as it makes them visible */
.button, .button,
button:not([hidden]), button,
input[type=submit]:not([hidden]), input[type=submit],
.tab { .tab {
align-items: center; align-items: center;
color: var(--color-gray); color: var(--color-gray);
@@ -591,17 +604,6 @@ form table.items td:first-child {
gap: 0.8em; gap: 0.8em;
flex-direction: column; flex-direction: column;
} }
[disabled] {
/* label:has(input[disabled]) {
* TODO: disabled checkbox blue square focus removal; disabled label styling;
* focused label styling (currently only checkbox has focus)
* */
border-color: var(--color-border-gray) !important;
color: var(--color-border-gray) !important;
cursor: not-allowed;
fill: var(--color-border-gray) !important;
pointer-events: none;
}
details { details {