|
47 | 47 | -moz-box-sizing: border-box; |
48 | 48 | box-sizing: border-box; |
49 | 49 | } |
| 50 | +/** |
| 51 | + * React Switch Button control style. |
| 52 | + * |
| 53 | + * @author =undo= <g.fazioli@undolog.com> |
| 54 | + * @date 2016-02-17 |
| 55 | + * @version 2.0.0 |
| 56 | + * |
| 57 | + */ |
50 | 58 | .rsbc-switch-button.rsbc-switch-button-flat-round input[type="checkbox"] + label { |
51 | 59 | padding: 2px; |
52 | 60 | width: 48px; |
|
124 | 132 | margin-left: 24px; |
125 | 133 | background-color: #d5d5d5; |
126 | 134 | } |
| 135 | +/** |
| 136 | + * React Switch Button control style square. |
| 137 | + * |
| 138 | + * @author =undo= <g.fazioli@undolog.com> |
| 139 | + * @date 2016-12-30 |
| 140 | + * @version 1.0.0 |
| 141 | + * |
| 142 | + */ |
| 143 | +.rsbc-switch-button.rsbc-switch-button-flat-square input[type="checkbox"] + label { |
| 144 | + padding: 2px; |
| 145 | + width: 48px; |
| 146 | + height: 24px; |
| 147 | + vertical-align: middle; |
| 148 | + background-color: #aaa; |
| 149 | + -webkit-border-radius: 3px; |
| 150 | + -moz-border-radius: 3px; |
| 151 | + border-radius: 3px; |
| 152 | + -webkit-transition: background 0.4s; |
| 153 | + -moz-transition: background 0.4s; |
| 154 | + -o-transition: background 0.4s; |
| 155 | + transition: background 0.4s; |
| 156 | +} |
| 157 | +.rsbc-switch-button.rsbc-switch-button-flat-square.disabled input[type="checkbox"] + label { |
| 158 | + background-color: #eee; |
| 159 | +} |
| 160 | +.rsbc-switch-button.rsbc-switch-button-flat-square:hover input[type="checkbox"] + label { |
| 161 | + background-color: #579fcb; |
| 162 | +} |
| 163 | +.rsbc-switch-button.rsbc-switch-button-flat-square.disabled:hover input[type="checkbox"] + label { |
| 164 | + background-color: #eee; |
| 165 | +} |
| 166 | +.rsbc-switch-button.rsbc-switch-button-flat-square input[type="checkbox"] + label:before, |
| 167 | +.rsbc-switch-button.rsbc-switch-button-flat-square input[type="checkbox"] + label:after { |
| 168 | + display: inline-block; |
| 169 | + position: absolute; |
| 170 | + content: ""; |
| 171 | +} |
| 172 | +.rsbc-switch-button.rsbc-switch-button-flat-square input[type="checkbox"] + label:before { |
| 173 | + top: 2px; |
| 174 | + left: 2px; |
| 175 | + bottom: 2px; |
| 176 | + right: 2px; |
| 177 | + background-color: #fff; |
| 178 | + -webkit-border-radius: 2px; |
| 179 | + -moz-border-radius: 2px; |
| 180 | + border-radius: 2px; |
| 181 | + -webkit-transition: background 0.4s; |
| 182 | + -moz-transition: background 0.4s; |
| 183 | + -o-transition: background 0.4s; |
| 184 | + transition: background 0.4s; |
| 185 | +} |
| 186 | +.rsbc-switch-button.rsbc-switch-button-flat-square input[type="checkbox"] + label:after { |
| 187 | + top: 4px; |
| 188 | + left: 4px; |
| 189 | + bottom: 4px; |
| 190 | + width: 16px; |
| 191 | + background-color: #919191; |
| 192 | + -webkit-border-radius: 2px; |
| 193 | + -moz-border-radius: 2px; |
| 194 | + border-radius: 2px; |
| 195 | + -webkit-transition: margin 0.4s, background 0.4s; |
| 196 | + -moz-transition: margin 0.4s, background 0.4s; |
| 197 | + -o-transition: margin 0.4s, background 0.4s; |
| 198 | + transition: margin 0.4s, background 0.4s; |
| 199 | +} |
| 200 | +.rsbc-switch-button.rsbc-switch-button-flat-square.disabled input[type="checkbox"] + label:after { |
| 201 | + background-color: #d5d5d5; |
| 202 | +} |
| 203 | +.rsbc-switch-button.rsbc-switch-button-flat-square:hover input[type="checkbox"]:checked + label { |
| 204 | + background-color: #aaa; |
| 205 | +} |
| 206 | +.rsbc-switch-button.rsbc-switch-button-flat-square input[type="checkbox"]:checked + label { |
| 207 | + background-color: #579fcb; |
| 208 | +} |
| 209 | +.rsbc-switch-button.rsbc-switch-button-flat-square.disabled input[type="checkbox"]:checked + label { |
| 210 | + background-color: #eee; |
| 211 | +} |
| 212 | +.rsbc-switch-button.rsbc-switch-button-flat-square input[type="checkbox"]:checked + label:after { |
| 213 | + margin-left: 24px; |
| 214 | + background-color: #3887b7; |
| 215 | +} |
| 216 | +.rsbc-switch-button.rsbc-switch-button-flat-square.disabled input[type="checkbox"]:checked + label:after { |
| 217 | + margin-left: 24px; |
| 218 | + background-color: #d5d5d5; |
| 219 | +} |
0 commit comments