OLD | NEW |
| (Empty) |
1 /* | |
2 Copyright (c) 2014 The Polymer Project Authors. All rights reserved. | |
3 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt | |
4 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | |
5 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt | |
6 Code distributed by Google as part of the polymer project is also | |
7 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt | |
8 */ | |
9 | |
10 :host { | |
11 display: inline-block; | |
12 } | |
13 | |
14 :host(:focus) { | |
15 outline: none; | |
16 } | |
17 | |
18 /* Class selectors can be overridden by users. */ | |
19 | |
20 .toggle-bar { | |
21 background-color: #000000; | |
22 } | |
23 | |
24 .toggle-button { | |
25 background-color: #f1f1f1; | |
26 } | |
27 | |
28 [checked] .toggle { | |
29 background-color: #0f9d58; | |
30 } | |
31 | |
32 .toggle-ink { | |
33 color: #bbb; | |
34 } | |
35 | |
36 [checked] .toggle-ink { | |
37 color: #0f9d58; | |
38 } | |
39 | |
40 /* ID selectors should not be overriden by users. */ | |
41 | |
42 #toggleContainer { | |
43 position: relative; | |
44 width: 36px; | |
45 height: 14px; | |
46 } | |
47 | |
48 #toggleContainer[disabled] { | |
49 opacity: 0.3; | |
50 pointer-events: none; | |
51 } | |
52 | |
53 #toggleBar { | |
54 position: absolute; | |
55 height: 100%; | |
56 width: 100%; | |
57 border-radius: 8px; | |
58 pointer-events: none; | |
59 opacity: 0.26; | |
60 transition: background-color linear .08s; | |
61 } | |
62 | |
63 [checked] #toggleBar { | |
64 opacity: 0.5; | |
65 } | |
66 | |
67 #toggleButton { | |
68 position: absolute; | |
69 top: -3px; | |
70 height: 20px; | |
71 width: 20px; | |
72 border-radius: 50%; | |
73 box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.4); | |
74 transition: -webkit-transform linear .08s, background-color linear .08s; | |
75 transition: transform linear .08s, background-color linear .08s; | |
76 } | |
77 | |
78 #toggleButton.dragging { | |
79 -webkit-transition: none; | |
80 transition: none; | |
81 } | |
82 | |
83 [checked] #toggleButton { | |
84 -webkit-transform: translate(16px, 0); | |
85 transform: translate(16px, 0); | |
86 } | |
87 | |
88 #ink { | |
89 position: absolute; | |
90 top: -14px; | |
91 left: -14px; | |
92 width: 48px; | |
93 height: 48px; | |
94 pointer-events: none; | |
95 } | |
OLD | NEW |