Skip to content

Commit 9c8c776

Browse files
committed
css improvements
Now that these are formAsssociated, it looks like `:disabled` and `:checked` work in CSS. Before I had to use `[disabled]` and `[checked]`.
1 parent 55f8f00 commit 9c8c776

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

css/input-num.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
padding: 0 0.0625rem 0.0625rem 0.125rem;
4040
background-color:white; /* same as default, afaik */
4141
}
42+
input-num:disabled::part(input) {
43+
color: var(--medium-gray);
44+
}
4245
@media (hover:none) {
4346
input-num::part(buttons) { display:none }
4447
}

css/multi-check.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,25 @@ check-box, check-tri {
1414
stroke:var(--charcoal);
1515
color: var(--charcoal); /* color is for ::part(label) */
1616
}
17-
check-box[disabled], check-box[disabled][checked],
18-
check-tri[disabled], check-tri[disabled][checked] {
17+
check-box:disabled, check-box:disabled:checked,
18+
check-tri:disabled, check-tri:disabled:checked {
1919
fill-opacity:0.25;
2020
stroke:var(--medium-gray);
2121
color: var(--medium-gray);
2222
}
23-
check-box[checked]::part(check),
23+
check-box:checked::part(check),
2424
check-tri[value]::part(check) {
2525
fill-opacity:1;
2626
}
2727
check-box:hover::part(check),
2828
check-tri:hover::part(check),
29-
check-box[checked]:hover::part(check) {
29+
check-box:checked:hover::part(check) {
3030
fill-opacity:0.05;
3131
fill: var(--accent-blue);
3232
stroke:var(--medium-blue);
3333
}
34-
check-box:active, check-tri:active::part(check),
35-
check-box[checked]:active,
34+
check-box:active::part(check),
35+
check-tri:active::part(check),
3636
check-tri:not([value])::part(default) {
3737
fill-opacity:1;
3838
fill:white;

css/state-btn.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ state-btn:active {
1616
stroke-width:3px;
1717
fill:none;
1818
}
19-
state-btn[disabled] {
19+
state-btn:disabled {
2020
fill :#666;
2121
stroke :#666;
2222
}

0 commit comments

Comments
 (0)