@anyblades/blades 3.1.0-beta.5 → 3.1.0-beta.7

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.
Files changed (82) hide show
  1. package/.prettierrc.json +0 -7
  2. package/README.md +27 -50
  3. package/_includes/.prettierrc.json +12 -0
  4. package/_includes/package.json +10 -0
  5. package/css/blades.css +941 -1804
  6. package/css/blades.min.css +11 -1
  7. package/css/blades.ninja.css +1123 -2264
  8. package/css/blades.ninja.min.css +16 -1
  9. package/css/float-label.css +34 -187
  10. package/css/float-label.min.css +1 -1
  11. package/css/layered/blades.layered.css +941 -1804
  12. package/css/layered/blades.layered.min.css +11 -1
  13. package/css/layered/compact.css +10 -31
  14. package/css/layered/components/accordion.css +32 -21
  15. package/css/layered/components/card.css +8 -16
  16. package/css/layered/components/dropdown-popover.css +44 -59
  17. package/css/layered/components/dropdown.css +61 -61
  18. package/css/layered/components/group.css +40 -156
  19. package/css/layered/components/loading.css +28 -35
  20. package/css/layered/components/modal-modern.css +7 -15
  21. package/css/layered/components/modal.css +54 -65
  22. package/css/layered/components/nav.css +36 -36
  23. package/css/layered/components/progress.css +18 -23
  24. package/css/layered/components/timeline.css +5 -19
  25. package/css/layered/components/tooltip.css +88 -103
  26. package/css/layered/components.css +371 -517
  27. package/css/layered/content/button.css +37 -117
  28. package/css/layered/content/code-block.css +11 -23
  29. package/css/layered/content/code.css +11 -26
  30. package/css/layered/content/embedded-content.css +5 -10
  31. package/css/layered/content/figure.css +3 -5
  32. package/css/layered/content/icon.css +20 -47
  33. package/css/layered/content/link.css +18 -40
  34. package/css/layered/content/misc.css +1 -5
  35. package/css/layered/content/table.css +4 -10
  36. package/css/layered/content/typography.css +22 -41
  37. package/css/layered/content.css +102 -254
  38. package/css/layered/forms/basics.css +64 -142
  39. package/css/layered/forms/checkbox-radio-switch.css +46 -75
  40. package/css/layered/forms/float-label/core.css +13 -85
  41. package/css/layered/forms/float-label/theme.css +22 -104
  42. package/css/layered/forms/float-label.css +34 -187
  43. package/css/layered/forms/input-color.css +5 -5
  44. package/css/layered/forms/input-datetime.css +9 -26
  45. package/css/layered/forms/input-file.css +7 -8
  46. package/css/layered/forms/input-range.css +43 -50
  47. package/css/layered/forms/input-search.css +16 -47
  48. package/css/layered/forms.css +197 -355
  49. package/css/layered/layout/columns.css +4 -24
  50. package/css/layered/layout/container.css +13 -13
  51. package/css/layered/layout/document.css +4 -12
  52. package/css/layered/layout/grid.css +6 -8
  53. package/css/layered/layout/landmarks.css +1 -7
  54. package/css/layered/layout/overflow-auto.css +0 -3
  55. package/css/layered/layout/section.css +0 -3
  56. package/css/layered/layout.css +26 -39
  57. package/css/layered/utilities.css +6 -15
  58. package/css/layered/variables-blades.css +4 -16
  59. package/css/layered/variables.css +77 -181
  60. package/css/pico.conditional.css +785 -1368
  61. package/css/pico.conditional.min.css +1 -1
  62. package/css/pico.css +785 -1368
  63. package/css/pico.min.css +1 -1
  64. package/package.json +43 -31
  65. package/src/blades/_index.css +9 -9
  66. package/src/blades/components/_dropdown-popover.css +2 -0
  67. package/src/blades/components/_modal-modern.css +2 -0
  68. package/src/blades/forms/float-label/_index.css +2 -2
  69. package/src/blades.css +2 -2
  70. package/src/blades.ninja.css +3 -3
  71. package/src/float-label.css +1 -1
  72. package/src/ninja/_index.css +8 -9
  73. package/src/ninja/_table-helpers.css +4 -4
  74. package/src/ninja/_table-responsive.css +5 -5
  75. package/src/ninja/_utilities.css +1 -1
  76. package/src/pico/_index.css +6 -6
  77. package/src/pico/components/_index.css +9 -9
  78. package/src/pico/content/_index.css +8 -8
  79. package/src/pico/forms/_index.css +7 -7
  80. package/src/pico/layout/_index.css +5 -5
  81. package/src/pico.css +2 -2
  82. package/src/ninja/_scroll-to.css +0 -10
@@ -4,100 +4,28 @@
4
4
  * Copyright 2016–2026 (https://blades.ninja/css/float-label/)
5
5
  * Licensed under MIT
6
6
  */
7
- /*\3c !--section:docs-->
8
-
9
- First, we target either:
10
- 1. `<label>` which `:has` inner form inputs (classless approach)
11
- 2. or explicit `.has-float-label` class (explicit approach)
12
-
13
- ```css */
14
- label:has(> span):has(
15
- input:not([type="checkbox"], [type="radio"], [type="range"]),
16
- textarea,
17
- select
18
- ),
19
- .has-float-label {
7
+ label:has( > span):has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select), .has-float-label {
20
8
  display: block;
21
9
  position: relative;
22
- /*```
23
- Finally, we detect if placeholder is shown, but not in focus. That means we can safely hide it, and enlarge the float label instead:
24
- ```css */
25
- }
26
- /*```
27
- Then, we define the default/fallback state (when the float label should be minimized):
28
- ```css */
29
- label:has(> span):has(
30
- input:not([type="checkbox"], [type="radio"], [type="range"]),
31
- textarea,
32
- select
33
- ) > span,
34
- label:has(> span):has(
35
- input:not([type="checkbox"], [type="radio"], [type="range"]),
36
- textarea,
37
- select
38
- ) label,
39
- .has-float-label > span,
40
- .has-float-label label {
10
+
11
+ & > span, & label {
12
+ cursor: text;
13
+ font-size: 75%;
41
14
  position: absolute;
42
15
  top: 0;
43
16
  left: 0;
44
- font-size: 75%;
45
- cursor: text;
46
17
  }
47
- label:has(> span):has(
48
- input:not([type="checkbox"], [type="radio"], [type="range"]),
49
- textarea,
50
- select
51
- ) *:placeholder-shown:not(:focus)::-moz-placeholder, .has-float-label *:placeholder-shown:not(:focus)::-moz-placeholder {
52
- opacity: 0;
53
- }
54
- label:has(> span):has(
55
- input:not([type="checkbox"], [type="radio"], [type="range"]),
56
- textarea,
57
- select
58
- ) *:-moz-placeholder:not(:focus)::placeholder, .has-float-label *:-moz-placeholder:not(:focus)::placeholder {
59
- opacity: 0;
60
- }
61
- label:has(> span):has(
62
- input:not([type="checkbox"], [type="radio"], [type="range"]),
63
- textarea,
64
- select
65
- ) *:placeholder-shown:not(:focus)::placeholder, .has-float-label *:placeholder-shown:not(:focus)::placeholder {
18
+
19
+ & :placeholder-shown:not(:focus)::placeholder {
66
20
  opacity: 0;
67
21
  }
68
- label:has(> span):has(
69
- input:not([type="checkbox"], [type="radio"], [type="range"]),
70
- textarea,
71
- select
72
- ):has(*:-moz-placeholder:not(:focus)) > span, label:has(> span):has(
73
- input:not([type="checkbox"], [type="radio"], [type="range"]),
74
- textarea,
75
- select
76
- ):has(*:-moz-placeholder:not(:focus)) label, .has-float-label:has(*:-moz-placeholder:not(:focus)) > span, .has-float-label:has(*:-moz-placeholder:not(:focus)) label {
77
- font-size: inherit;
78
- opacity: 50%;
79
- }
80
- label:has(> span):has(
81
- input:not([type="checkbox"], [type="radio"], [type="range"]),
82
- textarea,
83
- select
84
- ):has(*:placeholder-shown:not(:focus)) > span,
85
- label:has(> span):has(
86
- input:not([type="checkbox"], [type="radio"], [type="range"]),
87
- textarea,
88
- select
89
- ):has(*:placeholder-shown:not(:focus)) label,
90
- .has-float-label:has(*:placeholder-shown:not(:focus)) > span,
91
- .has-float-label:has(*:placeholder-shown:not(:focus)) label {
22
+
23
+ &:has(:placeholder-shown:not(:focus)) {
24
+ & > span, & label {
92
25
  font-size: inherit;
93
- opacity: 50%;
26
+ opacity: .5;
94
27
  }
95
- /*```
96
-
97
- The `:has(*:placeholder-shown:not(:focus))` trick allows this input state information to *propagate* to the parent level. This enables modern CSS to target inner float label (`<span>` or `<label>`) regardless of its position relative to the input field.
98
-
99
- Historically, this was not possible: the float label had to be placed after the input field to be targeted using the `input:focus + label` selector.
100
-
101
- */
28
+ }
29
+ }
102
30
 
103
31
  }
@@ -1,110 +1,28 @@
1
1
  @layer blades {
2
- label:has(> span):has(
3
- input:not([type="checkbox"], [type="radio"], [type="range"]),
4
- textarea,
5
- select
6
- ),
7
- .has-float-label {
8
-
9
- /* Enlarged state */
10
- }
11
- /* Default/fallback state */
12
- label:has(> span):has(
13
- input:not([type="checkbox"], [type="radio"], [type="range"]),
14
- textarea,
15
- select
16
- ) > span,
17
- label:has(> span):has(
18
- input:not([type="checkbox"], [type="radio"], [type="range"]),
19
- textarea,
20
- select
21
- ) label,
22
- .has-float-label > span,
23
- .has-float-label label {
24
- padding-inline-start: calc(1rem + 1px); /* match Pico's padding + border */
25
- padding-block-start: 0.25rem;
26
- opacity: 75%;
27
- transition: all 0.25s;
28
- }
29
- label:has(> span):has(
30
- input:not([type="checkbox"], [type="radio"], [type="range"]),
31
- textarea,
32
- select
33
- ) input,
34
- label:has(> span):has(
35
- input:not([type="checkbox"], [type="radio"], [type="range"]),
36
- textarea,
37
- select
38
- ) textarea,
39
- label:has(> span):has(
40
- input:not([type="checkbox"], [type="radio"], [type="range"]),
41
- textarea,
42
- select
43
- ) select,
44
- .has-float-label input,
45
- .has-float-label textarea,
46
- .has-float-label select {
47
- margin-block-start: 0; /* reset Pico */
48
- padding-inline-start: 1rem; /* match Pico */
49
- padding-block: 1.125rem 0.375rem; /* match Pico's total: 2 x 0.75rem = 1.5rem */
2
+ label:has( > span):has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select), .has-float-label {
3
+ & > span, & label {
4
+ opacity: .75;
5
+ padding-block-start: .25rem;
6
+ padding-inline-start: calc(1rem + 1px);
7
+ transition: all .25s;
50
8
  }
51
- label:has(> span):has(
52
- input:not([type="checkbox"], [type="radio"], [type="range"]),
53
- textarea,
54
- select
55
- ) input::-moz-placeholder, label:has(> span):has(
56
- input:not([type="checkbox"], [type="radio"], [type="range"]),
57
- textarea,
58
- select
59
- ) textarea::-moz-placeholder, label:has(> span):has(
60
- input:not([type="checkbox"], [type="radio"], [type="range"]),
61
- textarea,
62
- select
63
- ) select::-moz-placeholder, .has-float-label input::-moz-placeholder, .has-float-label textarea::-moz-placeholder, .has-float-label select::-moz-placeholder {
64
- opacity: 100%;
65
- -moz-transition: all 0.25s;
66
- transition: all 0.25s;
67
- }
68
- label:has(> span):has(
69
- input:not([type="checkbox"], [type="radio"], [type="range"]),
70
- textarea,
71
- select
72
- ) input::placeholder, label:has(> span):has(
73
- input:not([type="checkbox"], [type="radio"], [type="range"]),
74
- textarea,
75
- select
76
- ) textarea::placeholder, label:has(> span):has(
77
- input:not([type="checkbox"], [type="radio"], [type="range"]),
78
- textarea,
79
- select
80
- ) select::placeholder, .has-float-label input::placeholder, .has-float-label textarea::placeholder, .has-float-label select::placeholder {
81
- opacity: 100%;
82
- transition: all 0.25s;
83
- }
84
- label:has(> span):has(
85
- input:not([type="checkbox"], [type="radio"], [type="range"]),
86
- textarea,
87
- select
88
- ):has(*:-moz-placeholder:not(:focus)) > span, label:has(> span):has(
89
- input:not([type="checkbox"], [type="radio"], [type="range"]),
90
- textarea,
91
- select
92
- ):has(*:-moz-placeholder:not(:focus)) label, .has-float-label:has(*:-moz-placeholder:not(:focus)) > span, .has-float-label:has(*:-moz-placeholder:not(:focus)) label {
93
- padding-block: 0.75rem; /* match Pico */
9
+
10
+ & input, & textarea, & select {
11
+ margin-block-start: 0;
12
+ padding-block: 1.125rem .375rem;
13
+ padding-inline-start: 1rem;
14
+
15
+ &::placeholder {
16
+ opacity: 1;
17
+ transition: all .25s;
94
18
  }
95
- label:has(> span):has(
96
- input:not([type="checkbox"], [type="radio"], [type="range"]),
97
- textarea,
98
- select
99
- ):has(*:placeholder-shown:not(:focus)) > span,
100
- label:has(> span):has(
101
- input:not([type="checkbox"], [type="radio"], [type="range"]),
102
- textarea,
103
- select
104
- ):has(*:placeholder-shown:not(:focus)) label,
105
- .has-float-label:has(*:placeholder-shown:not(:focus)) > span,
106
- .has-float-label:has(*:placeholder-shown:not(:focus)) label {
107
- padding-block: 0.75rem; /* match Pico */
19
+ }
20
+
21
+ &:has(:placeholder-shown:not(:focus)) {
22
+ & > span, & label {
23
+ padding-block: .75rem;
108
24
  }
25
+ }
26
+ }
109
27
 
110
28
  }
@@ -4,207 +4,54 @@
4
4
  * Copyright 2016–2026 (https://blades.ninja/css/float-label/)
5
5
  * Licensed under MIT
6
6
  */
7
- /*\3c !--section:docs-->
8
-
9
- First, we target either:
10
- 1. `<label>` which `:has` inner form inputs (classless approach)
11
- 2. or explicit `.has-float-label` class (explicit approach)
12
-
13
- ```css */
14
- label:has(> span):has(
15
- input:not([type="checkbox"], [type="radio"], [type="range"]),
16
- textarea,
17
- select
18
- ),
19
- .has-float-label {
7
+ label:has( > span):has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select), .has-float-label {
20
8
  display: block;
21
9
  position: relative;
22
- /*```
23
- Finally, we detect if placeholder is shown, but not in focus. That means we can safely hide it, and enlarge the float label instead:
24
- ```css */
25
- }
26
- /*```
27
- Then, we define the default/fallback state (when the float label should be minimized):
28
- ```css */
29
- label:has(> span):has(
30
- input:not([type="checkbox"], [type="radio"], [type="range"]),
31
- textarea,
32
- select
33
- ) > span,
34
- label:has(> span):has(
35
- input:not([type="checkbox"], [type="radio"], [type="range"]),
36
- textarea,
37
- select
38
- ) label,
39
- .has-float-label > span,
40
- .has-float-label label {
10
+
11
+ & > span, & label {
12
+ cursor: text;
13
+ font-size: 75%;
41
14
  position: absolute;
42
15
  top: 0;
43
16
  left: 0;
44
- font-size: 75%;
45
- cursor: text;
46
17
  }
47
- label:has(> span):has(
48
- input:not([type="checkbox"], [type="radio"], [type="range"]),
49
- textarea,
50
- select
51
- ) *:placeholder-shown:not(:focus)::-moz-placeholder, .has-float-label *:placeholder-shown:not(:focus)::-moz-placeholder {
52
- opacity: 0;
53
- }
54
- label:has(> span):has(
55
- input:not([type="checkbox"], [type="radio"], [type="range"]),
56
- textarea,
57
- select
58
- ) *:-moz-placeholder:not(:focus)::placeholder, .has-float-label *:-moz-placeholder:not(:focus)::placeholder {
59
- opacity: 0;
60
- }
61
- label:has(> span):has(
62
- input:not([type="checkbox"], [type="radio"], [type="range"]),
63
- textarea,
64
- select
65
- ) *:placeholder-shown:not(:focus)::placeholder, .has-float-label *:placeholder-shown:not(:focus)::placeholder {
18
+
19
+ & :placeholder-shown:not(:focus)::placeholder {
66
20
  opacity: 0;
67
21
  }
68
- label:has(> span):has(
69
- input:not([type="checkbox"], [type="radio"], [type="range"]),
70
- textarea,
71
- select
72
- ):has(*:-moz-placeholder:not(:focus)) > span, label:has(> span):has(
73
- input:not([type="checkbox"], [type="radio"], [type="range"]),
74
- textarea,
75
- select
76
- ):has(*:-moz-placeholder:not(:focus)) label, .has-float-label:has(*:-moz-placeholder:not(:focus)) > span, .has-float-label:has(*:-moz-placeholder:not(:focus)) label {
77
- font-size: inherit;
78
- opacity: 50%;
79
- }
80
- label:has(> span):has(
81
- input:not([type="checkbox"], [type="radio"], [type="range"]),
82
- textarea,
83
- select
84
- ):has(*:placeholder-shown:not(:focus)) > span,
85
- label:has(> span):has(
86
- input:not([type="checkbox"], [type="radio"], [type="range"]),
87
- textarea,
88
- select
89
- ):has(*:placeholder-shown:not(:focus)) label,
90
- .has-float-label:has(*:placeholder-shown:not(:focus)) > span,
91
- .has-float-label:has(*:placeholder-shown:not(:focus)) label {
22
+
23
+ &:has(:placeholder-shown:not(:focus)) {
24
+ & > span, & label {
92
25
  font-size: inherit;
93
- opacity: 50%;
26
+ opacity: .5;
94
27
  }
95
- /*```
96
-
97
- The `:has(*:placeholder-shown:not(:focus))` trick allows this input state information to *propagate* to the parent level. This enables modern CSS to target inner float label (`<span>` or `<label>`) regardless of its position relative to the input field.
28
+ }
29
+ }
98
30
 
99
- Historically, this was not possible: the float label had to be placed after the input field to be targeted using the `input:focus + label` selector.
31
+ label:has( > span):has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select), .has-float-label {
32
+ & > span, & label {
33
+ opacity: .75;
34
+ padding-block-start: .25rem;
35
+ padding-inline-start: calc(1rem + 1px);
36
+ transition: all .25s;
37
+ }
100
38
 
101
- */
102
- label:has(> span):has(
103
- input:not([type="checkbox"], [type="radio"], [type="range"]),
104
- textarea,
105
- select
106
- ),
107
- .has-float-label {
39
+ & input, & textarea, & select {
40
+ margin-block-start: 0;
41
+ padding-block: 1.125rem .375rem;
42
+ padding-inline-start: 1rem;
108
43
 
109
- /* Enlarged state */
110
- }
111
- /* Default/fallback state */
112
- label:has(> span):has(
113
- input:not([type="checkbox"], [type="radio"], [type="range"]),
114
- textarea,
115
- select
116
- ) > span,
117
- label:has(> span):has(
118
- input:not([type="checkbox"], [type="radio"], [type="range"]),
119
- textarea,
120
- select
121
- ) label,
122
- .has-float-label > span,
123
- .has-float-label label {
124
- padding-inline-start: calc(1rem + 1px); /* match Pico's padding + border */
125
- padding-block-start: 0.25rem;
126
- opacity: 75%;
127
- transition: all 0.25s;
128
- }
129
- label:has(> span):has(
130
- input:not([type="checkbox"], [type="radio"], [type="range"]),
131
- textarea,
132
- select
133
- ) input,
134
- label:has(> span):has(
135
- input:not([type="checkbox"], [type="radio"], [type="range"]),
136
- textarea,
137
- select
138
- ) textarea,
139
- label:has(> span):has(
140
- input:not([type="checkbox"], [type="radio"], [type="range"]),
141
- textarea,
142
- select
143
- ) select,
144
- .has-float-label input,
145
- .has-float-label textarea,
146
- .has-float-label select {
147
- margin-block-start: 0; /* reset Pico */
148
- padding-inline-start: 1rem; /* match Pico */
149
- padding-block: 1.125rem 0.375rem; /* match Pico's total: 2 x 0.75rem = 1.5rem */
150
- }
151
- label:has(> span):has(
152
- input:not([type="checkbox"], [type="radio"], [type="range"]),
153
- textarea,
154
- select
155
- ) input::-moz-placeholder, label:has(> span):has(
156
- input:not([type="checkbox"], [type="radio"], [type="range"]),
157
- textarea,
158
- select
159
- ) textarea::-moz-placeholder, label:has(> span):has(
160
- input:not([type="checkbox"], [type="radio"], [type="range"]),
161
- textarea,
162
- select
163
- ) select::-moz-placeholder, .has-float-label input::-moz-placeholder, .has-float-label textarea::-moz-placeholder, .has-float-label select::-moz-placeholder {
164
- opacity: 100%;
165
- -moz-transition: all 0.25s;
166
- transition: all 0.25s;
167
- }
168
- label:has(> span):has(
169
- input:not([type="checkbox"], [type="radio"], [type="range"]),
170
- textarea,
171
- select
172
- ) input::placeholder, label:has(> span):has(
173
- input:not([type="checkbox"], [type="radio"], [type="range"]),
174
- textarea,
175
- select
176
- ) textarea::placeholder, label:has(> span):has(
177
- input:not([type="checkbox"], [type="radio"], [type="range"]),
178
- textarea,
179
- select
180
- ) select::placeholder, .has-float-label input::placeholder, .has-float-label textarea::placeholder, .has-float-label select::placeholder {
181
- opacity: 100%;
182
- transition: all 0.25s;
44
+ &::placeholder {
45
+ opacity: 1;
46
+ transition: all .25s;
183
47
  }
184
- label:has(> span):has(
185
- input:not([type="checkbox"], [type="radio"], [type="range"]),
186
- textarea,
187
- select
188
- ):has(*:-moz-placeholder:not(:focus)) > span, label:has(> span):has(
189
- input:not([type="checkbox"], [type="radio"], [type="range"]),
190
- textarea,
191
- select
192
- ):has(*:-moz-placeholder:not(:focus)) label, .has-float-label:has(*:-moz-placeholder:not(:focus)) > span, .has-float-label:has(*:-moz-placeholder:not(:focus)) label {
193
- padding-block: 0.75rem; /* match Pico */
194
- }
195
- label:has(> span):has(
196
- input:not([type="checkbox"], [type="radio"], [type="range"]),
197
- textarea,
198
- select
199
- ):has(*:placeholder-shown:not(:focus)) > span,
200
- label:has(> span):has(
201
- input:not([type="checkbox"], [type="radio"], [type="range"]),
202
- textarea,
203
- select
204
- ):has(*:placeholder-shown:not(:focus)) label,
205
- .has-float-label:has(*:placeholder-shown:not(:focus)) > span,
206
- .has-float-label:has(*:placeholder-shown:not(:focus)) label {
207
- padding-block: 0.75rem; /* match Pico */
48
+ }
49
+
50
+ &:has(:placeholder-shown:not(:focus)) {
51
+ & > span, & label {
52
+ padding-block: .75rem;
208
53
  }
54
+ }
55
+ }
209
56
 
210
57
  }
@@ -1,20 +1,20 @@
1
1
  @layer blades {
2
- /**
3
- * Input type color
4
- */
5
2
  [type="color"]::-webkit-color-swatch-wrapper {
6
3
  padding: 0;
7
4
  }
5
+
8
6
  [type="color"]::-moz-focus-inner {
9
7
  padding: 0;
10
8
  }
9
+
11
10
  [type="color"]::-webkit-color-swatch {
11
+ border-radius: calc(var(--pico-border-radius) * .5);
12
12
  border: 0;
13
- border-radius: calc(var(--pico-border-radius) * 0.5);
14
13
  }
14
+
15
15
  [type="color"]::-moz-color-swatch {
16
+ border-radius: calc(var(--pico-border-radius) * .5);
16
17
  border: 0;
17
- border-radius: calc(var(--pico-border-radius) * 0.5);
18
18
  }
19
19
 
20
20
  }
@@ -1,38 +1,25 @@
1
1
  @layer blades {
2
- /**
3
- * Input type datetime
4
- */
5
- :where(:scope),
6
- :host {
2
+ :where(:scope), :host {
7
3
  --pico-icon-date: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
8
4
  --pico-icon-time: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
9
5
  }
10
6
 
11
- input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]):is(
12
- [type="date"],
13
- [type="datetime-local"],
14
- [type="month"],
15
- [type="time"],
16
- [type="week"]
17
- ) {
18
- --pico-icon-position: 0.75rem;
7
+ input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]):is([type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"]) {
8
+ --pico-icon-position: .75rem;
19
9
  --pico-icon-width: 1rem;
20
- min-width: 0;
21
10
  padding-right: calc(var(--pico-icon-width) + var(--pico-icon-position));
22
11
  background-image: var(--pico-icon-date);
23
12
  background-position: center right var(--pico-icon-position);
24
13
  background-size: var(--pico-icon-width) auto;
25
14
  background-repeat: no-repeat;
15
+ min-width: 0;
26
16
  }
17
+
27
18
  input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"])[type="time"] {
28
19
  background-image: var(--pico-icon-time);
29
20
  }
30
21
 
31
- [type="date"]::-webkit-calendar-picker-indicator,
32
- [type="datetime-local"]::-webkit-calendar-picker-indicator,
33
- [type="month"]::-webkit-calendar-picker-indicator,
34
- [type="time"]::-webkit-calendar-picker-indicator,
35
- [type="week"]::-webkit-calendar-picker-indicator {
22
+ [type="date"]::-webkit-calendar-picker-indicator, [type="datetime-local"]::-webkit-calendar-picker-indicator, [type="month"]::-webkit-calendar-picker-indicator, [type="time"]::-webkit-calendar-picker-indicator, [type="week"]::-webkit-calendar-picker-indicator {
36
23
  width: var(--pico-icon-width);
37
24
  margin-right: calc(var(--pico-icon-width) * -1);
38
25
  margin-left: var(--pico-icon-position);
@@ -40,17 +27,13 @@ input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"])[type
40
27
  }
41
28
 
42
29
  @-moz-document url-prefix() {
43
- [type="date"],
44
- [type="datetime-local"],
45
- [type="month"],
46
- [type="time"],
47
- [type="week"] {
30
+ [type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"] {
48
31
  padding-right: var(--pico-form-element-spacing-horizontal) !important;
49
32
  background-image: none !important;
50
33
  }
51
34
  }
52
- [dir="rtl"]
53
- :is([type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"]) {
35
+
36
+ [dir="rtl"] :is([type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"]) {
54
37
  text-align: end;
55
38
  }
56
39
 
@@ -1,28 +1,27 @@
1
1
  @layer blades {
2
- /**
3
- * Input type file
4
- */
5
2
  [type="file"] {
6
3
  --pico-color: var(--pico-muted-color);
7
4
  margin-left: calc(var(--pico-outline-width) * -1);
8
- padding: calc(var(--pico-form-element-spacing-vertical) * 0.5) 0;
5
+ padding: calc(var(--pico-form-element-spacing-vertical) * .5) 0;
9
6
  padding-left: var(--pico-outline-width);
7
+ background: none;
10
8
  border: 0;
11
9
  border-radius: 0;
12
- background: none;
13
10
  }
11
+
14
12
  [type="file"]::file-selector-button {
15
13
  margin-right: calc(var(--pico-spacing) / 2);
16
- padding: calc(var(--pico-form-element-spacing-vertical) * 0.5)
14
+ padding: calc(var(--pico-form-element-spacing-vertical) * .5)
17
15
  var(--pico-form-element-spacing-horizontal);
18
16
  }
17
+
19
18
  [type="file"]:is(:hover, :active, :focus)::file-selector-button {
20
19
  --pico-background-color: var(--pico-secondary-hover-background);
21
20
  --pico-border-color: var(--pico-secondary-hover-border);
22
21
  }
22
+
23
23
  [type="file"]:focus::file-selector-button {
24
- --pico-box-shadow:
25
- var(--pico-button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),
24
+ --pico-box-shadow: var(--pico-button-hover-box-shadow, 0 0 0 #0000),
26
25
  0 0 0 var(--pico-outline-width) var(--pico-secondary-focus);
27
26
  }
28
27