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