-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsegmentedcontrols.css
More file actions
60 lines (59 loc) · 1.25 KB
/
segmentedcontrols.css
File metadata and controls
60 lines (59 loc) · 1.25 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
.flight-types {
display: flex;
max-width: 336px;
width: 100%;
position: relative;
user-select: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
position: relative;
z-index: 1;
margin: 0 auto;
font-size: 12px;
border: 1px solid #0077FF;
border-radius: 3px;
color: #0077FF;
}
.flight-types > input {
display: none;
}
.flight-types > input:checked + label {
color: #fff;
}
.flight-types > input:nth-of-type(1):checked ~ label:last-of-type:before {
transform: translateX(calc(0% + 0px));
}
.flight-types > input:nth-of-type(2):checked ~ label:last-of-type:before {
transform: translateX(calc(100% + 0px));
}
.flight-types label {
flex: 1;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
}
.flight-types label:last-of-type:before {
content: "";
display: block;
max-width: calc(50% + 0px);
margin: 0px;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: -1;
transform: translateX(0);
}
.flight-types label {
padding: 6px 3px;
transition: color 250ms cubic-bezier(0, 0.95, 0.38, 0.98);
}
.flight-types label:before {
background: #0077FF;
transition: all 250ms cubic-bezier(0, 0.95, 0.38, 0.98);
}
.flight-types label:not(:last-child) {
border-right: 1px solid #0077FF;
}