Skip to content

Commit 458c41d

Browse files
lukewarlownt1m
authored andcommitted
[css-forms-1] Fix ::checkmark styles to apply when input is checked
Also apply a border-radius to radio inputs.
1 parent 965c13d commit 458c41d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

css-forms-1/Overview.bs

+8-4
Original file line numberDiff line numberDiff line change
@@ -677,17 +677,21 @@ input:is([type=checkbox]:not([switch]), [type=radio]) {
677677
display: inline-flex;
678678
align-items: center;
679679
justify-content: center;
680+
content: '';
681+
}
682+
683+
input[type=radio] {
684+
border-radius: 100%;
680685
}
681686
682-
input[type=checkbox]:not([switch])::checkmark {
687+
input[type=checkbox]:not([switch]):checked::checkmark {
683688
content: '\2713' / '';
684689
}
685690

686-
input[type=radio]::checkmark {
687-
content: '';
691+
input[type=radio]:checked::checkmark {
688692
background-color: currentColor;
689693
display: inline-block;
690-
border-radius: 100%;
694+
border-radius: inherit;
691695
height: 100%;
692696
width: 100%;
693697
}

0 commit comments

Comments
 (0)