提交 | 用户 | age
|
5b18c2
|
1 |
.clr-picker { |
X |
2 |
display: none; |
|
3 |
flex-wrap: wrap; |
|
4 |
position: absolute; |
|
5 |
width: 200px; |
|
6 |
z-index: 1000; |
|
7 |
border-radius: 10px; |
|
8 |
background-color: #fff; |
|
9 |
justify-content: space-between; |
|
10 |
box-shadow: 0 0 5px rgba(0, 0, 0, .05), 0 5px 20px rgba(0, 0, 0, .1); |
|
11 |
-moz-user-select: none; |
|
12 |
-webkit-user-select: none; |
|
13 |
user-select: none |
|
14 |
} |
|
15 |
|
|
16 |
.clr-picker.clr-open { |
|
17 |
display: flex |
|
18 |
} |
|
19 |
|
|
20 |
.clr-dark { |
|
21 |
background-color: #444 |
|
22 |
} |
|
23 |
|
|
24 |
.clr-gradient { |
|
25 |
position: relative; |
|
26 |
width: 100%; |
|
27 |
height: 100px; |
|
28 |
margin-bottom: 15px; |
|
29 |
border-radius: 3px 3px 0 0; |
|
30 |
background-image: linear-gradient(rgba(0, 0, 0, 0), #000), linear-gradient(90deg, #fff, currentColor); |
|
31 |
cursor: pointer |
|
32 |
} |
|
33 |
|
|
34 |
.clr-marker { |
|
35 |
position: absolute; |
|
36 |
width: 12px; |
|
37 |
height: 12px; |
|
38 |
margin: -6px 0 0 -6px; |
|
39 |
border: 1px solid #fff; |
|
40 |
border-radius: 50%; |
|
41 |
background-color: currentColor; |
|
42 |
cursor: pointer |
|
43 |
} |
|
44 |
|
|
45 |
.clr-picker input[type=range]::-webkit-slider-runnable-track { |
|
46 |
width: 100%; |
|
47 |
height: 8px |
|
48 |
} |
|
49 |
|
|
50 |
.clr-picker input[type=range]::-webkit-slider-thumb { |
|
51 |
width: 8px; |
|
52 |
height: 8px; |
|
53 |
-webkit-appearance: none |
|
54 |
} |
|
55 |
|
|
56 |
.clr-picker input[type=range]::-moz-range-track { |
|
57 |
width: 100%; |
|
58 |
height: 8px; |
|
59 |
border: 0 |
|
60 |
} |
|
61 |
|
|
62 |
.clr-picker input[type=range]::-moz-range-thumb { |
|
63 |
width: 8px; |
|
64 |
height: 8px; |
|
65 |
border: 0 |
|
66 |
} |
|
67 |
|
|
68 |
.clr-hue { |
|
69 |
background-image: linear-gradient(to right, red 0, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, red 100%) |
|
70 |
} |
|
71 |
|
|
72 |
.clr-alpha, .clr-hue { |
|
73 |
position: relative; |
|
74 |
width: calc(100% - 40px); |
|
75 |
height: 8px; |
|
76 |
margin: 5px 20px; |
|
77 |
border-radius: 4px |
|
78 |
} |
|
79 |
|
|
80 |
.clr-alpha span { |
|
81 |
display: block; |
|
82 |
height: 100%; |
|
83 |
width: 100%; |
|
84 |
border-radius: inherit; |
|
85 |
background-image: linear-gradient(90deg, rgba(0, 0, 0, 0), currentColor) |
|
86 |
} |
|
87 |
|
|
88 |
.clr-alpha input, .clr-hue input { |
|
89 |
position: absolute; |
|
90 |
width: calc(100% + 16px); |
|
91 |
height: 16px; |
|
92 |
left: -8px; |
|
93 |
top: -4px; |
|
94 |
margin: 0; |
|
95 |
background-color: transparent; |
|
96 |
opacity: 0; |
|
97 |
cursor: pointer; |
|
98 |
appearance: none; |
|
99 |
-webkit-appearance: none |
|
100 |
} |
|
101 |
|
|
102 |
.clr-alpha div, .clr-hue div { |
|
103 |
position: absolute; |
|
104 |
width: 16px; |
|
105 |
height: 16px; |
|
106 |
left: 0; |
|
107 |
top: 0; |
|
108 |
margin: -4px 0 0 -8px; |
|
109 |
border: 2px solid #fff; |
|
110 |
border-radius: 50%; |
|
111 |
background-color: currentColor; |
|
112 |
box-shadow: 0 0 1px #888; |
|
113 |
pointer-events: none |
|
114 |
} |
|
115 |
|
|
116 |
.clr-alpha div:before { |
|
117 |
content: ''; |
|
118 |
position: absolute; |
|
119 |
height: 100%; |
|
120 |
width: 100%; |
|
121 |
left: 0; |
|
122 |
top: 0; |
|
123 |
border-radius: 50%; |
|
124 |
background-color: currentColor |
|
125 |
} |
|
126 |
|
|
127 |
.clr-swatches { |
|
128 |
order: 2; |
|
129 |
width: calc(100% - 40px); |
|
130 |
margin: 0 20px |
|
131 |
} |
|
132 |
|
|
133 |
.clr-swatches div { |
|
134 |
display: flex; |
|
135 |
flex-wrap: wrap; |
|
136 |
padding-bottom: 12px; |
|
137 |
justify-content: center |
|
138 |
} |
|
139 |
|
|
140 |
.clr-swatches button { |
|
141 |
position: relative; |
|
142 |
width: 20px; |
|
143 |
height: 20px; |
|
144 |
margin: 0 8px 6px 0; |
|
145 |
border: 0; |
|
146 |
border-radius: 50%; |
|
147 |
color: inherit; |
|
148 |
text-indent: -1000px; |
|
149 |
white-space: nowrap; |
|
150 |
overflow: hidden; |
|
151 |
cursor: pointer |
|
152 |
} |
|
153 |
|
|
154 |
.clr-swatches button:last-child, .clr-swatches button:nth-child(6n) { |
|
155 |
margin-right: 0 |
|
156 |
} |
|
157 |
|
|
158 |
.clr-swatches button:after { |
|
159 |
content: ''; |
|
160 |
display: block; |
|
161 |
position: absolute; |
|
162 |
width: 100%; |
|
163 |
height: 100%; |
|
164 |
left: 0; |
|
165 |
top: 0; |
|
166 |
border-radius: inherit; |
|
167 |
background-color: currentColor; |
|
168 |
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1) |
|
169 |
} |
|
170 |
|
|
171 |
.clr-dark .clr-swatches button:after { |
|
172 |
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3) |
|
173 |
} |
|
174 |
|
|
175 |
input.clr-color { |
|
176 |
order: 1; |
|
177 |
width: 120px; |
|
178 |
height: 32px; |
|
179 |
margin: 15px 20px 15px 0; |
|
180 |
padding: 0 15px; |
|
181 |
border: 1px solid #ddd; |
|
182 |
border-radius: 16px; |
|
183 |
color: #444; |
|
184 |
background-color: #fff; |
|
185 |
font-family: sans-serif; |
|
186 |
font-size: 14px; |
|
187 |
text-align: left; |
|
188 |
box-shadow: none |
|
189 |
} |
|
190 |
|
|
191 |
.clr-dark input.clr-color { |
|
192 |
color: #fff; |
|
193 |
border-color: #777; |
|
194 |
background-color: #555 |
|
195 |
} |
|
196 |
|
|
197 |
input.clr-color:focus { |
|
198 |
outline: 0; |
|
199 |
border: 1px solid #aaa |
|
200 |
} |
|
201 |
|
|
202 |
.clr-preview { |
|
203 |
position: relative; |
|
204 |
width: 32px; |
|
205 |
height: 32px; |
|
206 |
margin: 15px 0 20px 20px; |
|
207 |
border: 0; |
|
208 |
border-radius: 50%; |
|
209 |
overflow: hidden; |
|
210 |
cursor: pointer |
|
211 |
} |
|
212 |
|
|
213 |
.clr-preview:after, .clr-preview:before { |
|
214 |
content: ''; |
|
215 |
position: absolute; |
|
216 |
height: 100%; |
|
217 |
width: 100%; |
|
218 |
left: 0; |
|
219 |
top: 0; |
|
220 |
border: 1px solid #fff; |
|
221 |
border-radius: 50% |
|
222 |
} |
|
223 |
|
|
224 |
.clr-preview:after { |
|
225 |
border: 0; |
|
226 |
background-color: currentColor; |
|
227 |
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1) |
|
228 |
} |
|
229 |
|
|
230 |
.clr-dark .clr-preview:after { |
|
231 |
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5) |
|
232 |
} |
|
233 |
|
|
234 |
.clr-alpha div, .clr-color, .clr-hue div, .clr-marker { |
|
235 |
box-sizing: border-box |
|
236 |
} |
|
237 |
|
|
238 |
.clr-field { |
|
239 |
display: inline-block; |
|
240 |
position: relative; |
|
241 |
color: #00000000; |
|
242 |
/*color: #000*/ |
|
243 |
} |
|
244 |
|
|
245 |
.clr-field button { |
|
246 |
position: absolute; |
|
247 |
width: 30px; |
|
248 |
height: 100%; |
|
249 |
right: 0; |
|
250 |
top: 50%; |
|
251 |
transform: translateY(-50%); |
|
252 |
border: 0; |
|
253 |
color: inherit; |
|
254 |
text-indent: -1000px; |
|
255 |
white-space: nowrap; |
|
256 |
overflow: hidden; |
|
257 |
pointer-events: none |
|
258 |
} |
|
259 |
|
|
260 |
.clr-field button:after { |
|
261 |
content: ''; |
|
262 |
display: block; |
|
263 |
position: absolute; |
|
264 |
width: 100%; |
|
265 |
height: 100%; |
|
266 |
left: 0; |
|
267 |
top: 0; |
|
268 |
border-radius: inherit; |
|
269 |
background-color: currentColor; |
|
270 |
box-shadow: inset 0 0 1px rgba(0, 0, 0, .5) |
|
271 |
} |
|
272 |
|
|
273 |
.clr-alpha, .clr-alpha div, .clr-field button, .clr-preview:before, .clr-swatches button { |
|
274 |
background-image: repeating-linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%, #aaa), repeating-linear-gradient(45deg, #aaa 25%, #fff 25%, #fff 75%, #aaa 75%, #aaa); |
|
275 |
background-position: 0 0, 4px 4px; |
|
276 |
background-size: 8px 8px |
|
277 |
} |
|
278 |
|
|
279 |
.clr-marker:focus { |
|
280 |
outline: 0 |
|
281 |
} |
|
282 |
|
|
283 |
.clr-keyboard-nav .clr-alpha input:focus + div, .clr-keyboard-nav .clr-hue input:focus + div, .clr-keyboard-nav .clr-marker:focus { |
|
284 |
outline: 0; |
|
285 |
box-shadow: 0 0 0 2px #1e90ff, 0 0 2px 2px #fff |
|
286 |
} |