@anyblades/pico 2.1.1-alpha → 2.2.0-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/_forms.css ADDED
@@ -0,0 +1,745 @@
1
+ /**
2
+ * Basics form elements
3
+ */
4
+ input,
5
+ optgroup,
6
+ select,
7
+ textarea {
8
+ margin: 0;
9
+ font-size: 1rem;
10
+ line-height: var(--pico-line-height);
11
+ font-family: inherit;
12
+ letter-spacing: inherit;
13
+ }
14
+
15
+ input {
16
+ overflow: visible;
17
+ }
18
+
19
+ select {
20
+ text-transform: none;
21
+ }
22
+
23
+ legend {
24
+ max-width: 100%;
25
+ padding: 0;
26
+ color: inherit;
27
+ white-space: normal;
28
+ }
29
+
30
+ textarea {
31
+ overflow: auto;
32
+ }
33
+
34
+ [type="checkbox"],
35
+ [type="radio"] {
36
+ padding: 0;
37
+ }
38
+
39
+ ::-webkit-inner-spin-button,
40
+ ::-webkit-outer-spin-button {
41
+ height: auto;
42
+ }
43
+
44
+ [type="search"] {
45
+ -webkit-appearance: textfield;
46
+ outline-offset: -2px;
47
+ }
48
+
49
+ [type="search"]::-webkit-search-decoration {
50
+ -webkit-appearance: none;
51
+ }
52
+
53
+ ::-webkit-file-upload-button {
54
+ -webkit-appearance: button;
55
+ font: inherit;
56
+ }
57
+
58
+ ::-moz-focus-inner {
59
+ padding: 0;
60
+ border-style: none;
61
+ }
62
+
63
+ :-moz-focusring {
64
+ outline: none;
65
+ }
66
+
67
+ :-moz-ui-invalid {
68
+ box-shadow: none;
69
+ }
70
+
71
+ ::-ms-expand {
72
+ display: none;
73
+ }
74
+
75
+ [type="file"],
76
+ [type="range"] {
77
+ padding: 0;
78
+ border-width: 0;
79
+ }
80
+
81
+ input:not([type="checkbox"], [type="radio"], [type="range"]) {
82
+ height: calc(
83
+ 1rem * var(--pico-line-height) + var(--pico-form-element-spacing-vertical) * 2 +
84
+ var(--pico-border-width) * 2
85
+ );
86
+ }
87
+
88
+ fieldset {
89
+ width: 100%;
90
+ margin: 0;
91
+ margin-bottom: var(--pico-spacing);
92
+ padding: 0;
93
+ border: 0;
94
+ }
95
+
96
+ label,
97
+ fieldset legend {
98
+ display: block;
99
+ margin-bottom: calc(var(--pico-spacing) * 0.375);
100
+ color: var(--pico-color);
101
+ font-weight: var(--pico-form-label-font-weight, var(--pico-font-weight));
102
+ }
103
+
104
+ fieldset legend {
105
+ margin-bottom: calc(var(--pico-spacing) * 0.5);
106
+ }
107
+
108
+ input:not([type="checkbox"], [type="radio"]),
109
+ button[type="submit"],
110
+ select,
111
+ textarea {
112
+ width: 100%;
113
+ }
114
+
115
+ input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]),
116
+ select,
117
+ textarea {
118
+ -webkit-appearance: none;
119
+ -moz-appearance: none;
120
+ appearance: none;
121
+ padding: var(--pico-form-element-spacing-vertical) var(--pico-form-element-spacing-horizontal);
122
+ }
123
+
124
+ input,
125
+ select,
126
+ textarea {
127
+ --pico-background-color: var(--pico-form-element-background-color);
128
+ --pico-border-color: var(--pico-form-element-border-color);
129
+ --pico-color: var(--pico-form-element-color);
130
+ --pico-box-shadow: none;
131
+ border: var(--pico-border-width) solid var(--pico-border-color);
132
+ border-radius: var(--pico-border-radius);
133
+ outline: none;
134
+ background-color: var(--pico-background-color);
135
+ box-shadow: var(--pico-box-shadow);
136
+ color: var(--pico-color);
137
+ font-weight: var(--pico-font-weight);
138
+ transition:
139
+ background-color var(--pico-transition),
140
+ border-color var(--pico-transition),
141
+ color var(--pico-transition),
142
+ box-shadow var(--pico-transition);
143
+ }
144
+
145
+ input:not(
146
+ [type="submit"],
147
+ [type="button"],
148
+ [type="reset"],
149
+ [type="checkbox"],
150
+ [type="radio"],
151
+ [readonly]
152
+ ):is(:active, :focus),
153
+ :where(select, textarea):not([readonly]):is(:active, :focus) {
154
+ --pico-background-color: var(--pico-form-element-active-background-color);
155
+ }
156
+
157
+ input:not([type="submit"], [type="button"], [type="reset"], [role="switch"], [readonly]):is(
158
+ :active,
159
+ :focus
160
+ ),
161
+ :where(select, textarea):not([readonly]):is(:active, :focus) {
162
+ --pico-border-color: var(--pico-form-element-active-border-color);
163
+ }
164
+
165
+ input:not(
166
+ [type="submit"],
167
+ [type="button"],
168
+ [type="reset"],
169
+ [type="range"],
170
+ [type="file"],
171
+ [readonly]
172
+ ):focus,
173
+ :where(select, textarea):not([readonly]):focus {
174
+ --pico-box-shadow: 0 0 0 var(--pico-outline-width) var(--pico-form-element-focus-color);
175
+ }
176
+
177
+ input:not([type="submit"], [type="button"], [type="reset"])[disabled],
178
+ select[disabled],
179
+ textarea[disabled],
180
+ label[aria-disabled="true"],
181
+ :where(fieldset[disabled])
182
+ :is(input:not([type="submit"], [type="button"], [type="reset"]), select, textarea) {
183
+ opacity: var(--pico-form-element-disabled-opacity);
184
+ pointer-events: none;
185
+ }
186
+
187
+ label[aria-disabled="true"] input[disabled] {
188
+ opacity: 1;
189
+ }
190
+
191
+ :where(input, select, textarea):not(
192
+ [type="checkbox"],
193
+ [type="radio"],
194
+ [type="date"],
195
+ [type="datetime-local"],
196
+ [type="month"],
197
+ [type="time"],
198
+ [type="week"],
199
+ [type="range"]
200
+ )[aria-invalid] {
201
+ padding-right: calc(var(--pico-form-element-spacing-horizontal) + 1.5rem) !important;
202
+ padding-left: var(--pico-form-element-spacing-horizontal);
203
+ padding-inline-start: var(--pico-form-element-spacing-horizontal) !important;
204
+ padding-inline-end: calc(var(--pico-form-element-spacing-horizontal) + 1.5rem) !important;
205
+ background-position: center right 0.75rem;
206
+ background-size: 1rem auto;
207
+ background-repeat: no-repeat;
208
+ }
209
+ :where(input, select, textarea):not(
210
+ [type="checkbox"],
211
+ [type="radio"],
212
+ [type="date"],
213
+ [type="datetime-local"],
214
+ [type="month"],
215
+ [type="time"],
216
+ [type="week"],
217
+ [type="range"]
218
+ )[aria-invalid="false"]:not(select) {
219
+ background-image: var(--pico-icon-valid);
220
+ }
221
+ :where(input, select, textarea):not(
222
+ [type="checkbox"],
223
+ [type="radio"],
224
+ [type="date"],
225
+ [type="datetime-local"],
226
+ [type="month"],
227
+ [type="time"],
228
+ [type="week"],
229
+ [type="range"]
230
+ )[aria-invalid="true"]:not(select) {
231
+ background-image: var(--pico-icon-invalid);
232
+ }
233
+ :where(input, select, textarea)[aria-invalid="false"] {
234
+ --pico-border-color: var(--pico-form-element-valid-border-color);
235
+ }
236
+ :where(input, select, textarea)[aria-invalid="false"]:is(:active, :focus) {
237
+ --pico-border-color: var(--pico-form-element-valid-active-border-color) !important;
238
+ }
239
+ :where(input, select, textarea)[aria-invalid="false"]:is(:active, :focus):not(
240
+ [type="checkbox"],
241
+ [type="radio"]
242
+ ) {
243
+ --pico-box-shadow: 0 0 0 var(--pico-outline-width) var(--pico-form-element-valid-focus-color) !important;
244
+ }
245
+ :where(input, select, textarea)[aria-invalid="true"] {
246
+ --pico-border-color: var(--pico-form-element-invalid-border-color);
247
+ }
248
+ :where(input, select, textarea)[aria-invalid="true"]:is(:active, :focus) {
249
+ --pico-border-color: var(--pico-form-element-invalid-active-border-color) !important;
250
+ }
251
+ :where(input, select, textarea)[aria-invalid="true"]:is(:active, :focus):not(
252
+ [type="checkbox"],
253
+ [type="radio"]
254
+ ) {
255
+ --pico-box-shadow: 0 0 0 var(--pico-outline-width) var(--pico-form-element-invalid-focus-color) !important;
256
+ }
257
+
258
+ [dir="rtl"]
259
+ :where(input, select, textarea):not([type="checkbox"], [type="radio"]):is(
260
+ [aria-invalid],
261
+ [aria-invalid="true"],
262
+ [aria-invalid="false"]
263
+ ) {
264
+ background-position: center left 0.75rem;
265
+ }
266
+
267
+ input::placeholder,
268
+ input::-webkit-input-placeholder,
269
+ textarea::placeholder,
270
+ textarea::-webkit-input-placeholder,
271
+ select:invalid {
272
+ color: var(--pico-form-element-placeholder-color);
273
+ opacity: 1;
274
+ }
275
+
276
+ input:not([type="checkbox"], [type="radio"]),
277
+ select,
278
+ textarea {
279
+ margin-bottom: var(--pico-spacing);
280
+ }
281
+
282
+ select::-ms-expand {
283
+ border: 0;
284
+ background-color: transparent;
285
+ }
286
+ select:not([multiple], [size]) {
287
+ padding-right: calc(var(--pico-form-element-spacing-horizontal) + 1.5rem);
288
+ padding-left: var(--pico-form-element-spacing-horizontal);
289
+ padding-inline-start: var(--pico-form-element-spacing-horizontal);
290
+ padding-inline-end: calc(var(--pico-form-element-spacing-horizontal) + 1.5rem);
291
+ background-image: var(--pico-icon-chevron);
292
+ background-position: center right 0.75rem;
293
+ background-size: 1rem auto;
294
+ background-repeat: no-repeat;
295
+ }
296
+ select[multiple] option:checked {
297
+ background: var(--pico-form-element-selected-background-color);
298
+ color: var(--pico-form-element-color);
299
+ }
300
+
301
+ [dir="rtl"] select:not([multiple], [size]) {
302
+ background-position: center left 0.75rem;
303
+ }
304
+
305
+ textarea {
306
+ display: block;
307
+ resize: vertical;
308
+ }
309
+ textarea[aria-invalid] {
310
+ --pico-icon-height: calc(
311
+ 1rem * var(--pico-line-height) + var(--pico-form-element-spacing-vertical) * 2 +
312
+ var(--pico-border-width) * 2
313
+ );
314
+ background-position: top right 0.75rem !important;
315
+ background-size: 1rem var(--pico-icon-height) !important;
316
+ }
317
+
318
+ :where(input, select, textarea, fieldset, .grid) + small {
319
+ display: block;
320
+ width: 100%;
321
+ margin-top: calc(var(--pico-spacing) * -0.75);
322
+ margin-bottom: var(--pico-spacing);
323
+ color: var(--pico-muted-color);
324
+ }
325
+ :where(input, select, textarea, fieldset, .grid)[aria-invalid="false"] + small {
326
+ color: var(--pico-ins-color);
327
+ }
328
+ :where(input, select, textarea, fieldset, .grid)[aria-invalid="true"] + small {
329
+ color: var(--pico-del-color);
330
+ }
331
+
332
+ label > :where(input, select, textarea) {
333
+ margin-top: calc(var(--pico-spacing) * 0.25);
334
+ }
335
+
336
+ /**
337
+ * Checkboxes, Radios and Switches
338
+ */
339
+ label:has([type="checkbox"], [type="radio"]) {
340
+ width: -moz-fit-content;
341
+ width: fit-content;
342
+ cursor: pointer;
343
+ }
344
+
345
+ [type="checkbox"],
346
+ [type="radio"] {
347
+ -webkit-appearance: none;
348
+ -moz-appearance: none;
349
+ appearance: none;
350
+ width: 1.25em;
351
+ height: 1.25em;
352
+ margin-top: -0.125em;
353
+ margin-inline-end: 0.5em;
354
+ border-width: var(--pico-border-width);
355
+ vertical-align: middle;
356
+ cursor: pointer;
357
+ }
358
+ [type="checkbox"]::-ms-check,
359
+ [type="radio"]::-ms-check {
360
+ display: none;
361
+ }
362
+ [type="checkbox"]:checked,
363
+ [type="checkbox"]:checked:active,
364
+ [type="checkbox"]:checked:focus,
365
+ [type="radio"]:checked,
366
+ [type="radio"]:checked:active,
367
+ [type="radio"]:checked:focus {
368
+ --pico-background-color: var(--pico-primary-background);
369
+ --pico-border-color: var(--pico-primary-border);
370
+ background-image: var(--pico-icon-checkbox);
371
+ background-position: center;
372
+ background-size: 0.75em auto;
373
+ background-repeat: no-repeat;
374
+ }
375
+ [type="checkbox"] ~ label,
376
+ [type="radio"] ~ label {
377
+ display: inline-block;
378
+ margin-bottom: 0;
379
+ cursor: pointer;
380
+ }
381
+ [type="checkbox"] ~ label:not(:last-of-type),
382
+ [type="radio"] ~ label:not(:last-of-type) {
383
+ margin-inline-end: 1em;
384
+ }
385
+
386
+ [type="checkbox"]:indeterminate {
387
+ --pico-background-color: var(--pico-primary-background);
388
+ --pico-border-color: var(--pico-primary-border);
389
+ background-image: var(--pico-icon-minus);
390
+ background-position: center;
391
+ background-size: 0.75em auto;
392
+ background-repeat: no-repeat;
393
+ }
394
+
395
+ [type="radio"] {
396
+ border-radius: 50%;
397
+ }
398
+ [type="radio"]:checked,
399
+ [type="radio"]:checked:active,
400
+ [type="radio"]:checked:focus {
401
+ --pico-background-color: var(--pico-primary-inverse);
402
+ border-width: 0.35em;
403
+ background-image: none;
404
+ }
405
+
406
+ [type="checkbox"][role="switch"] {
407
+ --pico-background-color: var(--pico-switch-background-color);
408
+ --pico-color: var(--pico-switch-color);
409
+ width: 2.25em;
410
+ height: 1.25em;
411
+ border: var(--pico-border-width) solid var(--pico-border-color);
412
+ border-radius: 1.25em;
413
+ background-color: var(--pico-background-color);
414
+ line-height: 1.25em;
415
+ }
416
+ [type="checkbox"][role="switch"]:not([aria-invalid]) {
417
+ --pico-border-color: var(--pico-switch-background-color);
418
+ }
419
+ [type="checkbox"][role="switch"]:before {
420
+ display: block;
421
+ aspect-ratio: 1;
422
+ height: 100%;
423
+ border-radius: 50%;
424
+ background-color: var(--pico-color);
425
+ box-shadow: var(--pico-switch-thumb-box-shadow);
426
+ content: "";
427
+ transition: margin 0.1s ease-in-out;
428
+ }
429
+ [type="checkbox"][role="switch"]:focus {
430
+ --pico-background-color: var(--pico-switch-background-color);
431
+ --pico-border-color: var(--pico-switch-background-color);
432
+ }
433
+ [type="checkbox"][role="switch"]:checked {
434
+ --pico-background-color: var(--pico-switch-checked-background-color);
435
+ --pico-border-color: var(--pico-switch-checked-background-color);
436
+ background-image: none;
437
+ }
438
+ [type="checkbox"][role="switch"]:checked::before {
439
+ margin-inline-start: calc(2.25em - 1.25em);
440
+ }
441
+ [type="checkbox"][role="switch"][disabled] {
442
+ --pico-background-color: var(--pico-border-color);
443
+ }
444
+
445
+ [type="checkbox"][aria-invalid="false"]:checked,
446
+ [type="checkbox"][aria-invalid="false"]:checked:active,
447
+ [type="checkbox"][aria-invalid="false"]:checked:focus,
448
+ [type="checkbox"][role="switch"][aria-invalid="false"]:checked,
449
+ [type="checkbox"][role="switch"][aria-invalid="false"]:checked:active,
450
+ [type="checkbox"][role="switch"][aria-invalid="false"]:checked:focus {
451
+ --pico-background-color: var(--pico-form-element-valid-border-color);
452
+ }
453
+ [type="checkbox"]:checked[aria-invalid="true"],
454
+ [type="checkbox"]:checked:active[aria-invalid="true"],
455
+ [type="checkbox"]:checked:focus[aria-invalid="true"],
456
+ [type="checkbox"][role="switch"]:checked[aria-invalid="true"],
457
+ [type="checkbox"][role="switch"]:checked:active[aria-invalid="true"],
458
+ [type="checkbox"][role="switch"]:checked:focus[aria-invalid="true"] {
459
+ --pico-background-color: var(--pico-form-element-invalid-border-color);
460
+ }
461
+
462
+ [type="checkbox"][aria-invalid="false"]:checked,
463
+ [type="checkbox"][aria-invalid="false"]:checked:active,
464
+ [type="checkbox"][aria-invalid="false"]:checked:focus,
465
+ [type="radio"][aria-invalid="false"]:checked,
466
+ [type="radio"][aria-invalid="false"]:checked:active,
467
+ [type="radio"][aria-invalid="false"]:checked:focus,
468
+ [type="checkbox"][role="switch"][aria-invalid="false"]:checked,
469
+ [type="checkbox"][role="switch"][aria-invalid="false"]:checked:active,
470
+ [type="checkbox"][role="switch"][aria-invalid="false"]:checked:focus {
471
+ --pico-border-color: var(--pico-form-element-valid-border-color);
472
+ }
473
+ [type="checkbox"]:checked[aria-invalid="true"],
474
+ [type="checkbox"]:checked:active[aria-invalid="true"],
475
+ [type="checkbox"]:checked:focus[aria-invalid="true"],
476
+ [type="radio"]:checked[aria-invalid="true"],
477
+ [type="radio"]:checked:active[aria-invalid="true"],
478
+ [type="radio"]:checked:focus[aria-invalid="true"],
479
+ [type="checkbox"][role="switch"]:checked[aria-invalid="true"],
480
+ [type="checkbox"][role="switch"]:checked:active[aria-invalid="true"],
481
+ [type="checkbox"][role="switch"]:checked:focus[aria-invalid="true"] {
482
+ --pico-border-color: var(--pico-form-element-invalid-border-color);
483
+ }
484
+
485
+ /**
486
+ * Input type color
487
+ */
488
+ [type="color"]::-webkit-color-swatch-wrapper {
489
+ padding: 0;
490
+ }
491
+ [type="color"]::-moz-focus-inner {
492
+ padding: 0;
493
+ }
494
+ [type="color"]::-webkit-color-swatch {
495
+ border: 0;
496
+ border-radius: calc(var(--pico-border-radius) * 0.5);
497
+ }
498
+ [type="color"]::-moz-color-swatch {
499
+ border: 0;
500
+ border-radius: calc(var(--pico-border-radius) * 0.5);
501
+ }
502
+
503
+ /**
504
+ * Input type datetime
505
+ */
506
+ input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]):is(
507
+ [type="date"],
508
+ [type="datetime-local"],
509
+ [type="month"],
510
+ [type="time"],
511
+ [type="week"]
512
+ ) {
513
+ --pico-icon-position: 0.75rem;
514
+ --pico-icon-width: 1rem;
515
+ padding-right: calc(var(--pico-icon-width) + var(--pico-icon-position));
516
+ background-image: var(--pico-icon-date);
517
+ background-position: center right var(--pico-icon-position);
518
+ background-size: var(--pico-icon-width) auto;
519
+ background-repeat: no-repeat;
520
+ }
521
+ input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"])[type="time"] {
522
+ background-image: var(--pico-icon-time);
523
+ }
524
+
525
+ [type="date"]::-webkit-calendar-picker-indicator,
526
+ [type="datetime-local"]::-webkit-calendar-picker-indicator,
527
+ [type="month"]::-webkit-calendar-picker-indicator,
528
+ [type="time"]::-webkit-calendar-picker-indicator,
529
+ [type="week"]::-webkit-calendar-picker-indicator {
530
+ width: var(--pico-icon-width);
531
+ margin-right: calc(var(--pico-icon-width) * -1);
532
+ margin-left: var(--pico-icon-position);
533
+ opacity: 0;
534
+ }
535
+
536
+ @-moz-document url-prefix() {
537
+ [type="date"],
538
+ [type="datetime-local"],
539
+ [type="month"],
540
+ [type="time"],
541
+ [type="week"] {
542
+ padding-right: var(--pico-form-element-spacing-horizontal) !important;
543
+ background-image: none !important;
544
+ }
545
+ }
546
+ [dir="rtl"]
547
+ :is([type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"]) {
548
+ text-align: right;
549
+ }
550
+
551
+ /**
552
+ * Input type file
553
+ */
554
+ [type="file"] {
555
+ --pico-color: var(--pico-muted-color);
556
+ margin-left: calc(var(--pico-outline-width) * -1);
557
+ padding: calc(var(--pico-form-element-spacing-vertical) * 0.5) 0;
558
+ padding-left: var(--pico-outline-width);
559
+ border: 0;
560
+ border-radius: 0;
561
+ background: none;
562
+ }
563
+ [type="file"]::file-selector-button {
564
+ margin-right: calc(var(--pico-spacing) / 2);
565
+ padding: calc(var(--pico-form-element-spacing-vertical) * 0.5)
566
+ var(--pico-form-element-spacing-horizontal);
567
+ }
568
+ [type="file"]:is(:hover, :active, :focus)::file-selector-button {
569
+ --pico-background-color: var(--pico-secondary-hover-background);
570
+ --pico-border-color: var(--pico-secondary-hover-border);
571
+ }
572
+ [type="file"]:focus::file-selector-button {
573
+ --pico-box-shadow:
574
+ var(--pico-button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),
575
+ 0 0 0 var(--pico-outline-width) var(--pico-secondary-focus);
576
+ }
577
+
578
+ /**
579
+ * Input type range
580
+ */
581
+ [type="range"] {
582
+ -webkit-appearance: none;
583
+ -moz-appearance: none;
584
+ appearance: none;
585
+ width: 100%;
586
+ height: 1.25rem;
587
+ background: none;
588
+ }
589
+ [type="range"]::-webkit-slider-runnable-track {
590
+ width: 100%;
591
+ height: 0.375rem;
592
+ border-radius: var(--pico-border-radius);
593
+ background-color: var(--pico-range-border-color);
594
+ -webkit-transition:
595
+ background-color var(--pico-transition),
596
+ box-shadow var(--pico-transition);
597
+ transition:
598
+ background-color var(--pico-transition),
599
+ box-shadow var(--pico-transition);
600
+ }
601
+ [type="range"]::-moz-range-track {
602
+ width: 100%;
603
+ height: 0.375rem;
604
+ border-radius: var(--pico-border-radius);
605
+ background-color: var(--pico-range-border-color);
606
+ -moz-transition:
607
+ background-color var(--pico-transition),
608
+ box-shadow var(--pico-transition);
609
+ transition:
610
+ background-color var(--pico-transition),
611
+ box-shadow var(--pico-transition);
612
+ }
613
+ [type="range"]::-ms-track {
614
+ width: 100%;
615
+ height: 0.375rem;
616
+ border-radius: var(--pico-border-radius);
617
+ background-color: var(--pico-range-border-color);
618
+ -ms-transition:
619
+ background-color var(--pico-transition),
620
+ box-shadow var(--pico-transition);
621
+ transition:
622
+ background-color var(--pico-transition),
623
+ box-shadow var(--pico-transition);
624
+ }
625
+ [type="range"]::-webkit-slider-thumb {
626
+ -webkit-appearance: none;
627
+ width: 1.25rem;
628
+ height: 1.25rem;
629
+ margin-top: -0.4375rem;
630
+ border: 2px solid var(--pico-range-thumb-border-color);
631
+ border-radius: 50%;
632
+ background-color: var(--pico-range-thumb-color);
633
+ cursor: pointer;
634
+ -webkit-transition:
635
+ background-color var(--pico-transition),
636
+ transform var(--pico-transition);
637
+ transition:
638
+ background-color var(--pico-transition),
639
+ transform var(--pico-transition);
640
+ }
641
+ [type="range"]::-moz-range-thumb {
642
+ -webkit-appearance: none;
643
+ width: 1.25rem;
644
+ height: 1.25rem;
645
+ margin-top: -0.4375rem;
646
+ border: 2px solid var(--pico-range-thumb-border-color);
647
+ border-radius: 50%;
648
+ background-color: var(--pico-range-thumb-color);
649
+ cursor: pointer;
650
+ -moz-transition:
651
+ background-color var(--pico-transition),
652
+ transform var(--pico-transition);
653
+ transition:
654
+ background-color var(--pico-transition),
655
+ transform var(--pico-transition);
656
+ }
657
+ [type="range"]::-ms-thumb {
658
+ -webkit-appearance: none;
659
+ width: 1.25rem;
660
+ height: 1.25rem;
661
+ margin-top: -0.4375rem;
662
+ border: 2px solid var(--pico-range-thumb-border-color);
663
+ border-radius: 50%;
664
+ background-color: var(--pico-range-thumb-color);
665
+ cursor: pointer;
666
+ -ms-transition:
667
+ background-color var(--pico-transition),
668
+ transform var(--pico-transition);
669
+ transition:
670
+ background-color var(--pico-transition),
671
+ transform var(--pico-transition);
672
+ }
673
+ [type="range"]:active,
674
+ [type="range"]:focus-within {
675
+ --pico-range-border-color: var(--pico-range-active-border-color);
676
+ --pico-range-thumb-color: var(--pico-range-thumb-active-color);
677
+ }
678
+ [type="range"]:active::-webkit-slider-thumb {
679
+ transform: scale(1.25);
680
+ }
681
+ [type="range"]:active::-moz-range-thumb {
682
+ transform: scale(1.25);
683
+ }
684
+ [type="range"]:active::-ms-thumb {
685
+ transform: scale(1.25);
686
+ }
687
+
688
+ /**
689
+ * Input type search
690
+ */
691
+ input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"])[type="search"] {
692
+ padding-inline-start: calc(var(--pico-form-element-spacing-horizontal) + 1.75rem);
693
+ background-image: var(--pico-icon-search);
694
+ background-position: center left calc(var(--pico-form-element-spacing-horizontal) + 0.125rem);
695
+ background-size: 1rem auto;
696
+ background-repeat: no-repeat;
697
+ }
698
+ input:not(
699
+ [type="checkbox"],
700
+ [type="radio"],
701
+ [type="range"],
702
+ [type="file"]
703
+ )[type="search"][aria-invalid] {
704
+ padding-inline-start: calc(var(--pico-form-element-spacing-horizontal) + 1.75rem) !important;
705
+ background-position:
706
+ center left 1.125rem,
707
+ center right 0.75rem;
708
+ }
709
+ input:not(
710
+ [type="checkbox"],
711
+ [type="radio"],
712
+ [type="range"],
713
+ [type="file"]
714
+ )[type="search"][aria-invalid="false"] {
715
+ background-image: var(--pico-icon-search), var(--pico-icon-valid);
716
+ }
717
+ input:not(
718
+ [type="checkbox"],
719
+ [type="radio"],
720
+ [type="range"],
721
+ [type="file"]
722
+ )[type="search"][aria-invalid="true"] {
723
+ background-image: var(--pico-icon-search), var(--pico-icon-invalid);
724
+ }
725
+
726
+ [dir="rtl"]
727
+ :where(input):not(
728
+ [type="checkbox"],
729
+ [type="radio"],
730
+ [type="range"],
731
+ [type="file"]
732
+ )[type="search"] {
733
+ background-position: center right 1.125rem;
734
+ }
735
+ [dir="rtl"]
736
+ :where(input):not(
737
+ [type="checkbox"],
738
+ [type="radio"],
739
+ [type="range"],
740
+ [type="file"]
741
+ )[type="search"][aria-invalid] {
742
+ background-position:
743
+ center right 1.125rem,
744
+ center left 0.75rem;
745
+ }