@@ -837,36 +837,71 @@ select {
837837
838838## Sliders ## {#stylesheet-sliders}
839839
840- ISSUE: Refine meter, progress, switch and range input styling.
840+ ISSUE(12267) : Refine meter, progress, switch and range input styling.
841841
842842```css
843+ input[type="checkbox][switch] ,
844+ input[type="range"] {
845+ display: inline-flex;
846+ position: relative;
847+ align-items: center;
848+ inline-size: 100%;
849+ }
850+
843851input[type="checkbox"][switch] ::slider-track,
844852input[type="range"] ::slider-track,
845853meter::slider-track,
846854progress::slider-track {
847- height: 1em;
855+ block-size: 1em;
856+ inline-size: 100%;
857+ }
858+
859+ input[type=range] ::slider-track {
860+ block-size: 0.5em;
861+ }
862+
863+ input[type=checkbox][switch] ::slider-track {
864+ border-radius: 1em;
848865}
849866
850867input[type="checkbox"][switch] ::slider-fill,
851868input[type="range"] ::slider-fill,
852869meter::slider-fill,
853870progress::slider-fill {
854- height : 100%;
871+ block-size : 100%;
855872 background-color: currentColor;
856873}
857874
858875progress:indeterminate::slider-fill {
859876 inline-size: 0;
860877}
861878
879+ input[type=checkbox][switch] ::slider-fill {
880+ background-color: color-mix(currentColor 25%, transparent);
881+ border-radius: inherit;
882+
883+ block-size: 100%;
884+ inline-size: 0%;
885+ }
886+
887+ input[type="checkbox"][switch] :checked::slider-fill {
888+ inline-size: 100%;
889+ }
890+
862891input[type="checkbox"][switch] ::slider-thumb,
863892input[type="range"] ::slider-thumb {
864893 border-radius: 0;
865894 border: none;
866895 background-color: currentColor;
867896 appearance: none;
868- width: 1em;
869- height: 100%;
897+ inline-size: 1em;
898+ block-size: 1em;
899+ border-radius: 100%;
900+ position: absolute;
901+ }
902+
903+ input[type=checkbox][switch] :checked::slider-thumb {
904+ inset-inline-end: 0;
870905}
871906```
872907
0 commit comments