1+ .toggle-switch .react-toggle {
2+ --unchecked-background : # 757F88 ;
3+ --checked-background : # 6100FF ;
4+ --thumb-background : # FFF ;
5+ touch-action : pan-x;
6+
7+ display : inline-block;
8+ position : relative;
9+ cursor : pointer;
10+ background-color : transparent;
11+ border : 0 ;
12+ padding : 0 ;
13+
14+ -webkit-touch-callout : none;
15+ -webkit-user-select : none;
16+ -khtml-user-select : none;
17+ -moz-user-select : none;
18+ -ms-user-select : none;
19+ user-select : none;
20+
21+ -webkit-tap-highlight-color : rgba (0 , 0 , 0 , 0 );
22+ -webkit-tap-highlight-color : transparent;
23+ }
24+
25+ .react-toggle-screenreader-only {
26+ border : 0 ;
27+ clip : rect (0 0 0 0 );
28+ height : 1px ;
29+ margin : -1px ;
30+ overflow : hidden;
31+ padding : 0 ;
32+ position : absolute;
33+ width : 1px ;
34+ }
35+
36+ .react-toggle--disabled {
37+ cursor : not-allowed;
38+ opacity : 0.5 ;
39+ -webkit-transition : opacity 0.25s ;
40+ transition : opacity 0.25s ;
41+ }
42+
43+ .react-toggle-track {
44+ width : 30px ;
45+ height : 16px ;
46+ padding : 0 ;
47+ border-radius : 30px ;
48+ background-color : var (--unchecked-background );
49+ -webkit-transition : all 0.2s ease;
50+ -moz-transition : all 0.2s ease;
51+ transition : all 0.2s ease;
52+ }
53+
54+ .react-toggle : hover : not (.react-toggle--disabled ) .react-toggle-track {
55+ background-color : var (--unchecked-background );
56+ }
57+
58+ .react-toggle--checked .react-toggle-track {
59+ background-color : var (--checked-background );
60+ }
61+
62+ .react-toggle--checked : hover : not (.react-toggle--disabled ) .react-toggle-track {
63+ background-color : var (--checked-background );
64+ }
65+
66+ .react-toggle-track-check {
67+ position : absolute;
68+ width : 14px ;
69+ height : 10px ;
70+ top : 0px ;
71+ bottom : 0px ;
72+ margin-top : auto;
73+ margin-bottom : auto;
74+ line-height : 0 ;
75+ left : 8px ;
76+ opacity : 0 ;
77+ -webkit-transition : opacity 0.25s ease;
78+ -moz-transition : opacity 0.25s ease;
79+ transition : opacity 0.25s ease;
80+ }
81+
82+ .react-toggle--checked .react-toggle-track-check {
83+ opacity : 1 ;
84+ -webkit-transition : opacity 0.25s ease;
85+ -moz-transition : opacity 0.25s ease;
86+ transition : opacity 0.25s ease;
87+ }
88+
89+ .react-toggle-track-x {
90+ position : absolute;
91+ width : 10px ;
92+ height : 10px ;
93+ top : 0px ;
94+ bottom : 0px ;
95+ margin-top : auto;
96+ margin-bottom : auto;
97+ line-height : 0 ;
98+ right : 10px ;
99+ opacity : 1 ;
100+ -webkit-transition : opacity 0.25s ease;
101+ -moz-transition : opacity 0.25s ease;
102+ transition : opacity 0.25s ease;
103+ }
104+
105+ .react-toggle--checked .react-toggle-track-x {
106+ opacity : 0 ;
107+ }
108+
109+ .react-toggle-thumb {
110+ transition : all 0.5s cubic-bezier (0.23 , 1 , 0.32 , 1 ) 0ms ;
111+ position : absolute;
112+ top : 2px ;
113+ left : 2px ;
114+ width : 12px ;
115+ height : 12px ;
116+ border : none;
117+ border-radius : 50% ;
118+ background-color : var (--thumb-background );
119+
120+ -webkit-box-sizing : border-box;
121+ -moz-box-sizing : border-box;
122+ box-sizing : border-box;
123+
124+ -webkit-transition : all 0.25s ease;
125+ -moz-transition : all 0.25s ease;
126+ transition : all 0.25s ease;
127+ }
128+
129+ .react-toggle--checked .react-toggle-thumb {
130+ /* switch track width - (thumb width + 2px padding) */
131+ left : calc (30px - 14px );
132+ border-color : none;
133+ }
0 commit comments