-
Notifications
You must be signed in to change notification settings - Fork 1
/
tailwind.css
174 lines (136 loc) · 4.46 KB
/
tailwind.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
@tailwind base;
@tailwind components;
@tailwind utilities;
/* ---- SLIDER INPUT ---- */
.slider {
@apply w-10 h-6 rounded-full cursor-pointer relative mr-2 bg-gray;
}
.slider:before {
@apply absolute w-6 h-6 bg-white rounded-full border-gray shadow-none transition-transform duration-300 border-slider;
content: "";
}
input:checked + .slider {
@apply bg-blue;
}
input:checked + .slider:before {
@apply border-blue;
}
input:checked + .slider.inf {
@apply bg-green;
}
input:checked + .slider.inf:before {
@apply border-green;
}
input:checked + .slider.mat {
@apply bg-blue;
}
input:checked + .slider.mat:before {
@apply border-blue;
}
input:checked + .slider.fyz {
@apply bg-orange;
}
input:checked + .slider.fyz:before {
@apply border-orange;
}
input:checked + .slider.otr {
@apply bg-red;
}
input:checked + .slider.otr:before {
@apply border-red;
}
input:checked + .slider:before {
@apply transform-gpu translate-x-4;
}
input[type="search"]::-webkit-search-cancel-button {
display: none;
}
/* ---- double-slider ---- */
.double-slider {
@apply grid px-6 py-0 my-0 -mx-1.5 relative overflow-hidden gap-y-3 w-87;
--tw-gradient-stops: #4299e1 calc(.75rem + (var(--va))/14*17.25rem), #4299e1 calc(.75rem + (var(--vb))/14*17.25rem);
grid-template-rows: -webkit-max-content 1.5rem -webkit-max-content;
grid-template-rows: max-content 1.5rem max-content;
}
.double-slider::before, .double-slider::after {
@apply row-start-2 col-start-1 self-center h-6 rounded-full bg-gray transition-all duration-300;
--mask: red;
-webkit-mask: var(--mask);
mask: var(--mask);
-webkit-mask-composite: xor;
mask-composite: exclude;
content: "";
}
.double-slider::after {
@apply bg-gradient-to-r;
--mask: linear-gradient(90deg, red calc(.75rem + (var(--va))/14*17.25rem), transparent 0), linear-gradient(90deg, red calc(.75rem + (var(--vb))/14*17.25rem), transparent 0);
}
.double-slider:focus-within {
--tw-gradient-stops: #4299e1 calc(.75rem + (min(var(--va), var(--vb))/14*17.25rem)), #2C5282 calc(.75rem + (max(var(--va), var(--vb))/14*17.25rem));
}
.double-slider.switched:focus-within {
--tw-gradient-stops: #2C5282 calc(.75rem + (min(var(--va), var(--vb))/14*17.25rem)), #4299e1 calc(.75rem + (max(var(--va), var(--vb))/14*17.25rem));
}
.double-slider > input[type=range] {
@apply row-start-2 col-start-1 inset-0 transition duration-300 pointer-events-none cursor-grab z-10;
background: none;
}
.double-slider > input[type=range]:active {
@apply cursor-grabbing;
}
.double-slider > input[type=range]::-webkit-slider-runnable-track, .double-slider > input[type=range]::-webkit-slider-thumb, .double-slider > input[type=range] {
@apply appearance-none;
}
.double-slider > input[type=range]::-webkit-slider-runnable-track, .double-slider > input[type=range]::-moz-range-track {
@apply w-full h-full bg-none;
}
.double-slider > input[type=range]::-webkit-slider-thumb {
@apply box-border transition duration-300 h-6 w-6 rounded-full bg-white pointer-events-auto border-solid border-slider border-blue;
}
.double-slider > input[type=range]::-moz-range-thumb {
@apply box-border transition duration-300 h-6 w-6 rounded-full bg-white pointer-events-auto border-solid border-slider border-blue;
}
.double-slider > input[type=range]:focus::-webkit-slider-thumb {
@apply ring-4 ring-blue-800 border-blue-800;
}
.double-slider > input[type=range]:focus::-moz-range-thumb {
@apply ring-4 ring-blue-800 border-blue-800;
}
.double-slider > input[type=range]:focus {
@apply outline-none z-20;
}
.double-slider > input[type=range]:focus + output {
@apply z-20;
}
.double-slider > input[type=range]:focus + output > span {
@apply bg-blue-800;
}
@media screen and (max-width: 768px) {
.double-slider > input[type=range]:hover::-webkit-slider-thumb {
@apply ring-4 ring-blue-800 border-blue-800;
}
.double-slider > input[type=range]:hover::-moz-range-thumb {
@apply ring-4 ring-blue-800 border-blue-800;
}
.double-slider > input[type=range]:hover {
@apply outline-none z-20;
}
.double-slider > input[type=range]:hover + output {
@apply z-20;
}
.double-slider > input[type=range]:hover + output > span {
@apply bg-blue-800;
}
}
.double-slider > output {
@apply row-start-1 col-start-1 max-w-max ml-3 transform-gpu;
--tw-translate-x: calc((var(--c))/14*17.25rem);
}
.double-slider > output > span {
@apply block rounded px-1.5 text-white transition duration-300 transform-gpu -translate-x-1/2 bg-blue;
}
.svg {
@apply stroke-current stroke-2 fill-transparent;
stroke-linecap: round;
stroke-linejoin: round;
}