forked from chimpanzees/styleguide
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.styl
More file actions
100 lines (84 loc) · 2.04 KB
/
Copy pathindex.styl
File metadata and controls
100 lines (84 loc) · 2.04 KB
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
.ui-switch
display: inline-block;
width: 50px;
height: 31px;
position: relative;
color $color-text-light
input[type="checkbox"]
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 100;
opacity: 0;
outline: none;
margin: 0;
&:disabled + .status
opacity: 0.3;
&:checked + .status:before
transform: translate(70%, -5%);
&:checked + .status
background: #4cd964;
.status
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 27px;
background: #d0d2d3;
cursor: pointer;
position: relative;
display: inline-block;
&:before
content: "";
display: block;
position: absolute;
top: 4px;
left: 4px;
height: 25px;
width: 25px;
background: #fff;
box-shadow: 0px 0px 1px 0px rgba(0,0,0,0.25), 0px 4px 11px 0px rgba(0,0,0,0.08), -1px 3px 3px 0px rgba(0,0,0,0.14);
transition: transform 100ms ease;
border-radius: 50%;
transform: translate(-5%, -5%);
// Labeled switches
.ui-switch.ui-switch-labeled
.status
&:before
z-index 10
&:after
content attr(data-label-false)
font-size $font-size-small
position absolute
left calc(50% + 11px)
top 50%
transform: translate(-50%, -50%);
z-index 0
white-space nowrap
input[type="checkbox"]
&:checked + .status:after
content attr(data-label-true)
left calc(50% - 11px)
&.ui-switch-sm
width 90px
input[type="checkbox"]
&:checked + .status:before
transform: translate(58px, -5%);
&.ui-switch-md
width 120px
input[type="checkbox"]
&:checked + .status:before
transform: translate(88px, -5%);
&.ui-switch-lg
width 160px
input[type="checkbox"]
&:checked + .status:before
transform: translate(128px, -5%);
&.ui-switch-xl
width 200px
input[type="checkbox"]
&:checked + .status:before
transform: translate(168px, -5%);