forked from tannerlinsley/nz-toggle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ng-toggle.css
115 lines (115 loc) · 2.7 KB
/
ng-toggle.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
.ng-toggle-wrap {
display: inline-block;
margin: 3px;
position: relative;
width: 62px;
height: 36px;
-webkit-backface-visibility: hidden;
-webkit-transform: translateZ(0) scale(1.0, 1.0);
z-index: 0;
}
.ng-toggle-wrap:hover {
z-index: 1;
}
.ng-toggle-wrap.vertical {
height: 62px;
}
.ng-toggle-wrap .ng-toggle-switch {
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.ng-toggle-wrap.vertical .ng-toggle-switch {
-webkit-transform: translate(-50%, -50%) rotate(-90deg);
transform: translate(-50%, -50%) rotate(-90deg);
}
.ng-toggle-switch {
position: absolute;
left: 50%;
top: 50%;
width: 56px;
height: 30px;
display: inline-block;
background-color: #ddd;
border-radius: 25px;
-webkit-transition: background-color .25s ease;
transition: background-color .25s ease;
cursor: pointer;
}
.ng-toggle-switch.true {
background-color: #68C527;
}
.ng-toggle-switch.false {
background-color: #ff4d35;
}
.ng-toggle-false {
position: absolute;
left: 0;
width: 50%;
height: 100%;
}
.ng-toggle-true {
position: absolute;
right: 0;
width: 50%;
height: 100%;
}
.ng-toggle-handle {
width: 24px;
height: 24px;
border-radius: 100%;
background-color: white;
position: absolute;
top: 3px;
left: 16px;
-webkit-transition: all .2s ease-out;
transition: all .2s ease-out;
}
.ng-toggle-switch.true .ng-toggle-handle {
left: 29px;
}
.ng-toggle-switch.false .ng-toggle-handle {
left: 3px;
}
.ng-toggle-tooltip {
display: inline-block;
position: absolute;
right: 100%;
top: 50%;
-webkittransition: opacity .3s ease;
transition: opacity .3s ease;
transform: translate(-5px, -50%) translateZ(0) scale(1.0, 1.0);
-webkit-transform: translate(-5px, -50%) translateZ(0) scale(1.0, 1.0);
-webkit-backface-visibility: hidden;
background: rgba(0, 0, 0, 0.8);
color: #CCC;
padding: 3px 11px;
font-size: 12px;
border-radius: 12px;
opacity: 0;
pointer-events: none;
text-align: right;
white-space: nowrap;
}
.ng-toggle-wrap:hover .ng-toggle-tooltip {
opacity: 1;
}
.ng-toggle-tooltip:before {
width: 5px;
height: 5px;
border-style: solid;
border-width: 4px 0px 4px 5px;
border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0.8);
position: absolute;
right: -6px;
top: 50%;
-webkit-transform: translate(0, -50%);
transform: translate(0, -50%);
content: '';
pointer-events: none;
}
.ng-toggle-tooltip .active {
color: white;
box-shadow: 0 0 3px rgba(0, 0, 0, .4);
-webkit-transition: all .2s ease;
transition: all .2s ease;
}