88 flex-wrap : wrap;
99}
1010
11- .setting-line .radio-line input {
11+ .setting-line .radio-line input ,
12+ .setting-line .toggle input {
1213 margin-right : 0.3em ;
1314 height : 1.2rem ;
1415 width : 1.2rem ;
1718 outline : none;
1819 -webkit-appearance : none;
1920 cursor : pointer;
21+ }
22+ .setting-line .radio-line input {
2023 border-radius : 50% ;
2124}
22- .setting-line .radio-line input + span {
25+ .setting-line .toggle input : checked {
26+ content : url ('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40">\
27+ <path d= "M7,25L17,32L33,12" fill="none" stroke="black" stroke-width="5"/>\
28+ <path d= "M7,23L17,30L33,10" fill="none" stroke="white" stroke-width="5"/></svg>');
29+ }
30+
31+ .setting-line .radio-line input + span ,
32+ .setting-line .toggle span {
2333 padding-bottom : 1px ;
2434}
2535
4959 cursor : pointer;
5060}
5161
52- .toggle input {
53- opacity : 0 ;
54- position : absolute;
55- }
56-
57- .slider {
58- position : relative;
59- width : 45px ;
60- min-width : 45px ;
61- display : block;
62- height : 28px ;
63- margin-right : 20px ;
64- cursor : pointer;
65- background-color : # ccc ;
66- transition : .3s ;
67- }
68-
69- .slider : before {
70- position : absolute;
71- content : "" ;
72- height : 19px ;
73- width : 19px ;
74- left : 4px ;
75- bottom : 4px ;
76- transition : .3s ;
77- }
78-
79- input : checked + .slider : before {
80- transform : translateX (19px );
81- }
82-
8362.setting-line > .sub-settings {
8463 padding-left : 42px ;
8564 width : 100% ;
@@ -94,17 +73,19 @@ input:checked + .slider:before {
9473 box-shadow : inset 0 0 0 3px var (--main-background-color );
9574 background-color : var (--settings-input-color );
9675}
97- .setting-line .radio-line input : focus {
76+ .setting-line .toggle input : checked {
77+ background-color : var (--settings-input-color );
78+ }
79+ .setting-line .radio-line input : focus ,
80+ .setting-line .toggle input : focus {
9881 box-shadow : 0 0 1px 1px var (--settings-input-color );
9982}
10083/* In here we combine both `:focus` and `:checked` properties. */
10184.setting-line .radio-line input : checked : focus {
10285 box-shadow : inset 0 0 0 3px var (--main-background-color ),
10386 0 0 2px 2px var (--settings-input-color );
10487}
105- .setting-line .radio-line input : hover {
88+ .setting-line .radio-line input : hover ,
89+ .setting-line .toggle input : hover {
10690 border-color : var (--settings-input-color ) !important ;
10791}
108- input : checked + .slider {
109- background-color : var (--settings-input-color );
110- }
0 commit comments