@anyblades/blades 3.1.0-beta.4 → 3.1.0-beta.6
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/.prettierrc.json +0 -7
- package/README.md +20 -10
- package/_includes/.prettierrc.json +12 -0
- package/_includes/package.json +10 -0
- package/css/blades.css +942 -1805
- package/css/blades.min.css +11 -1
- package/css/blades.ninja.css +1124 -2265
- package/css/blades.ninja.min.css +16 -1
- package/css/float-label.css +34 -187
- package/css/float-label.min.css +1 -1
- package/css/layered/blades.layered.css +942 -1805
- package/css/layered/blades.layered.min.css +11 -1
- package/css/layered/compact.css +10 -31
- package/css/layered/components/accordion.css +32 -21
- package/css/layered/components/card.css +8 -16
- package/css/layered/components/dropdown-popover.css +92 -0
- package/css/layered/components/dropdown.css +61 -61
- package/css/layered/components/group.css +40 -156
- package/css/layered/components/loading.css +28 -35
- package/css/layered/components/modal-modern.css +20 -0
- package/css/layered/components/modal.css +54 -65
- package/css/layered/components/nav.css +36 -36
- package/css/layered/components/progress.css +18 -23
- package/css/layered/components/timeline.css +10 -0
- package/css/layered/components/tooltip.css +88 -103
- package/css/layered/components.css +371 -517
- package/css/layered/content/button.css +37 -117
- package/css/layered/content/code-block.css +20 -0
- package/css/layered/content/code.css +11 -26
- package/css/layered/content/embedded-content.css +5 -10
- package/css/layered/content/figure.css +3 -5
- package/css/layered/content/icon.css +33 -0
- package/css/layered/content/link.css +18 -40
- package/css/layered/content/misc.css +1 -5
- package/css/layered/content/table.css +4 -10
- package/css/layered/content/typography.css +22 -41
- package/css/layered/content.css +102 -254
- package/css/layered/forms/basics.css +64 -142
- package/css/layered/forms/checkbox-radio-switch.css +46 -75
- package/css/layered/forms/float-label/core.css +31 -0
- package/css/layered/forms/float-label/theme.css +28 -0
- package/css/layered/forms/float-label.css +57 -0
- package/css/layered/forms/input-color.css +5 -5
- package/css/layered/forms/input-datetime.css +9 -26
- package/css/layered/forms/input-file.css +7 -8
- package/css/layered/forms/input-range.css +43 -50
- package/css/layered/forms/input-search.css +16 -47
- package/css/layered/forms.css +197 -355
- package/css/layered/layout/columns.css +10 -0
- package/css/layered/layout/container.css +13 -13
- package/css/layered/layout/document.css +4 -12
- package/css/layered/layout/grid.css +6 -8
- package/css/layered/layout/landmarks.css +1 -7
- package/css/layered/layout/overflow-auto.css +0 -3
- package/css/layered/layout/section.css +0 -3
- package/css/layered/layout.css +26 -39
- package/css/layered/utilities.css +6 -15
- package/css/layered/variables-blades.css +11 -0
- package/css/layered/variables.css +77 -181
- package/css/pico.conditional.css +785 -1368
- package/css/pico.conditional.min.css +1 -1
- package/css/pico.css +785 -1368
- package/css/pico.min.css +1 -1
- package/package.json +13 -26
- package/src/blades/_index.css +9 -9
- package/src/blades/{_dropdown-popover.css → components/_dropdown-popover.css} +3 -3
- package/src/blades/forms/float-label/_index.css +2 -0
- package/src/blades.css +2 -2
- package/src/blades.ninja.css +3 -3
- package/src/float-label.css +1 -1
- package/src/ninja/_index.css +7 -8
- package/src/pico/_index.css +6 -6
- package/src/pico/components/_index.css +9 -9
- package/src/pico/content/_index.css +8 -8
- package/src/pico/forms/_index.css +7 -7
- package/src/pico/layout/_index.css +5 -5
- package/src/pico.css +2 -2
- package/_includes/blades/links.liquid +0 -21
- package/_includes/blades/links.njk +0 -9
- package/_includes/blades/links.twig +0 -18
- package/src/blades/float-label/_index.css +0 -2
- package/src/ninja/_page-anchors.css +0 -10
- /package/src/blades/{_variables.css → _variables-blades.css} +0 -0
- /package/src/blades/{_modal.css → components/_modal-modern.css} +0 -0
- /package/src/blades/{_timeline.css → components/_timeline.css} +0 -0
- /package/src/blades/{_code.css → content/_code-block.css} +0 -0
- /package/src/blades/{_icon.css → content/_icon.css} +0 -0
- /package/src/blades/{float-label → forms/float-label}/_core.css +0 -0
- /package/src/blades/{float-label → forms/float-label}/_theme.css +0 -0
- /package/src/blades/{_columns.css → layout/_columns.css} +0 -0
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
@layer blades {
|
|
2
|
-
|
|
3
|
-
* Basics form elements
|
|
4
|
-
*/
|
|
5
|
-
input,
|
|
6
|
-
optgroup,
|
|
7
|
-
select,
|
|
8
|
-
textarea {
|
|
9
|
-
margin: 0;
|
|
2
|
+
input, optgroup, select, textarea {
|
|
10
3
|
font-size: 1rem;
|
|
11
4
|
line-height: var(--pico-line-height);
|
|
12
|
-
font-family: inherit;
|
|
13
5
|
letter-spacing: inherit;
|
|
6
|
+
margin: 0;
|
|
7
|
+
font-family: inherit;
|
|
14
8
|
}
|
|
15
9
|
|
|
16
10
|
input {
|
|
@@ -23,22 +17,20 @@ select {
|
|
|
23
17
|
|
|
24
18
|
legend {
|
|
25
19
|
max-width: 100%;
|
|
26
|
-
padding: 0;
|
|
27
20
|
color: inherit;
|
|
28
21
|
white-space: normal;
|
|
22
|
+
padding: 0;
|
|
29
23
|
}
|
|
30
24
|
|
|
31
25
|
textarea {
|
|
32
26
|
overflow: auto;
|
|
33
27
|
}
|
|
34
28
|
|
|
35
|
-
[type="checkbox"],
|
|
36
|
-
[type="radio"] {
|
|
29
|
+
[type="checkbox"], [type="radio"] {
|
|
37
30
|
padding: 0;
|
|
38
31
|
}
|
|
39
32
|
|
|
40
|
-
::-webkit-inner-spin-button,
|
|
41
|
-
::-webkit-outer-spin-button {
|
|
33
|
+
::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
|
|
42
34
|
height: auto;
|
|
43
35
|
}
|
|
44
36
|
|
|
@@ -57,8 +49,8 @@ textarea {
|
|
|
57
49
|
}
|
|
58
50
|
|
|
59
51
|
::-moz-focus-inner {
|
|
60
|
-
padding: 0;
|
|
61
52
|
border-style: none;
|
|
53
|
+
padding: 0;
|
|
62
54
|
}
|
|
63
55
|
|
|
64
56
|
:-moz-focusring {
|
|
@@ -73,17 +65,14 @@ textarea {
|
|
|
73
65
|
display: none;
|
|
74
66
|
}
|
|
75
67
|
|
|
76
|
-
[type="file"],
|
|
77
|
-
[type="range"] {
|
|
78
|
-
padding: 0;
|
|
68
|
+
[type="file"], [type="range"] {
|
|
79
69
|
border-width: 0;
|
|
70
|
+
padding: 0;
|
|
80
71
|
}
|
|
81
72
|
|
|
82
73
|
input:not([type="checkbox"], [type="radio"], [type="range"]) {
|
|
83
|
-
height: calc(
|
|
84
|
-
|
|
85
|
-
var(--pico-border-width) * 2
|
|
86
|
-
);
|
|
74
|
+
height: calc(1rem * var(--pico-line-height) + var(--pico-form-element-spacing-vertical) * 2 +
|
|
75
|
+
var(--pico-border-width) * 2);
|
|
87
76
|
}
|
|
88
77
|
|
|
89
78
|
fieldset {
|
|
@@ -91,97 +80,63 @@ fieldset {
|
|
|
91
80
|
min-width: 0;
|
|
92
81
|
margin: 0;
|
|
93
82
|
margin-bottom: var(--pico-spacing);
|
|
94
|
-
padding: 0;
|
|
95
83
|
border: 0;
|
|
84
|
+
padding: 0;
|
|
96
85
|
}
|
|
97
86
|
|
|
98
|
-
label,
|
|
99
|
-
|
|
100
|
-
display: block;
|
|
101
|
-
margin-bottom: calc(var(--pico-spacing) * 0.375);
|
|
87
|
+
label, fieldset legend {
|
|
88
|
+
margin-bottom: calc(var(--pico-spacing) * .375);
|
|
102
89
|
color: var(--pico-color);
|
|
103
90
|
font-weight: var(--pico-form-label-font-weight, var(--pico-font-weight));
|
|
91
|
+
display: block;
|
|
104
92
|
}
|
|
105
93
|
|
|
106
94
|
fieldset legend {
|
|
107
|
-
margin-bottom: calc(var(--pico-spacing) *
|
|
95
|
+
margin-bottom: calc(var(--pico-spacing) * .5);
|
|
108
96
|
}
|
|
109
97
|
|
|
110
|
-
input:not([type="checkbox"], [type="radio"]),
|
|
111
|
-
button[type="submit"],
|
|
112
|
-
select,
|
|
113
|
-
textarea {
|
|
98
|
+
input:not([type="checkbox"], [type="radio"]), button[type="submit"], select, textarea {
|
|
114
99
|
width: 100%;
|
|
115
100
|
}
|
|
116
101
|
|
|
117
|
-
input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]),
|
|
118
|
-
select,
|
|
119
|
-
textarea {
|
|
102
|
+
input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]), select, textarea {
|
|
120
103
|
-webkit-appearance: none;
|
|
121
104
|
-moz-appearance: none;
|
|
122
105
|
appearance: none;
|
|
123
106
|
padding: var(--pico-form-element-spacing-vertical) var(--pico-form-element-spacing-horizontal);
|
|
124
107
|
}
|
|
125
108
|
|
|
126
|
-
input,
|
|
127
|
-
select,
|
|
128
|
-
textarea {
|
|
109
|
+
input, select, textarea {
|
|
129
110
|
--pico-background-color: var(--pico-form-element-background-color);
|
|
130
111
|
--pico-border-color: var(--pico-form-element-border-color);
|
|
131
112
|
--pico-color: var(--pico-form-element-color);
|
|
132
113
|
--pico-box-shadow: none;
|
|
133
114
|
border: var(--pico-border-width) solid var(--pico-border-color);
|
|
134
115
|
border-radius: var(--pico-border-radius);
|
|
135
|
-
outline: none;
|
|
136
116
|
background-color: var(--pico-background-color);
|
|
137
117
|
box-shadow: var(--pico-box-shadow);
|
|
138
118
|
color: var(--pico-color);
|
|
139
119
|
font-weight: var(--pico-font-weight);
|
|
140
|
-
transition:
|
|
141
|
-
background-color var(--pico-transition),
|
|
120
|
+
transition: background-color var(--pico-transition),
|
|
142
121
|
border-color var(--pico-transition),
|
|
143
122
|
color var(--pico-transition),
|
|
144
123
|
box-shadow var(--pico-transition);
|
|
124
|
+
outline: none;
|
|
145
125
|
}
|
|
146
126
|
|
|
147
|
-
input:not(
|
|
148
|
-
[type="submit"],
|
|
149
|
-
[type="button"],
|
|
150
|
-
[type="reset"],
|
|
151
|
-
[type="checkbox"],
|
|
152
|
-
[type="radio"],
|
|
153
|
-
[readonly]
|
|
154
|
-
):is(:active, :focus),
|
|
155
|
-
:where(select, textarea):not([readonly]):is(:active, :focus) {
|
|
127
|
+
input:not([type="submit"], [type="button"], [type="reset"], [type="checkbox"], [type="radio"], [readonly]):is(:active, :focus), :where(select, textarea):not([readonly]):is(:active, :focus) {
|
|
156
128
|
--pico-background-color: var(--pico-form-element-active-background-color);
|
|
157
129
|
}
|
|
158
130
|
|
|
159
|
-
input:not([type="submit"], [type="button"], [type="reset"], [role="switch"], [readonly]):is(
|
|
160
|
-
:active,
|
|
161
|
-
:focus
|
|
162
|
-
),
|
|
163
|
-
:where(select, textarea):not([readonly]):is(:active, :focus) {
|
|
131
|
+
input:not([type="submit"], [type="button"], [type="reset"], [role="switch"], [readonly]):is(:active, :focus), :where(select, textarea):not([readonly]):is(:active, :focus) {
|
|
164
132
|
--pico-border-color: var(--pico-form-element-active-border-color);
|
|
165
133
|
}
|
|
166
134
|
|
|
167
|
-
input:not(
|
|
168
|
-
[type="submit"],
|
|
169
|
-
[type="button"],
|
|
170
|
-
[type="reset"],
|
|
171
|
-
[type="range"],
|
|
172
|
-
[type="file"],
|
|
173
|
-
[readonly]
|
|
174
|
-
):focus,
|
|
175
|
-
:where(select, textarea):not([readonly]):focus {
|
|
135
|
+
input:not([type="submit"], [type="button"], [type="reset"], [type="range"], [type="file"], [readonly]):focus, :where(select, textarea):not([readonly]):focus {
|
|
176
136
|
--pico-box-shadow: 0 0 0 var(--pico-outline-width) var(--pico-form-element-focus-color);
|
|
177
137
|
}
|
|
178
138
|
|
|
179
|
-
input:not([type="submit"], [type="button"], [type="reset"])[disabled],
|
|
180
|
-
select[disabled],
|
|
181
|
-
textarea[disabled],
|
|
182
|
-
label[aria-disabled="true"],
|
|
183
|
-
:where(fieldset[disabled])
|
|
184
|
-
:is(input:not([type="submit"], [type="button"], [type="reset"]), select, textarea) {
|
|
139
|
+
input:not([type="submit"], [type="button"], [type="reset"])[disabled], select[disabled], textarea[disabled], label[aria-disabled="true"], :where(fieldset[disabled]) :is(input:not([type="submit"], [type="button"], [type="reset"]), select, textarea) {
|
|
185
140
|
opacity: var(--pico-form-element-disabled-opacity);
|
|
186
141
|
pointer-events: none;
|
|
187
142
|
}
|
|
@@ -190,149 +145,116 @@ label[aria-disabled="true"] input[disabled] {
|
|
|
190
145
|
opacity: 1;
|
|
191
146
|
}
|
|
192
147
|
|
|
193
|
-
:where(input, select, textarea):not(
|
|
194
|
-
[type="checkbox"],
|
|
195
|
-
[type="radio"],
|
|
196
|
-
[type="date"],
|
|
197
|
-
[type="datetime-local"],
|
|
198
|
-
[type="month"],
|
|
199
|
-
[type="time"],
|
|
200
|
-
[type="week"],
|
|
201
|
-
[type="range"]
|
|
202
|
-
)[aria-invalid] {
|
|
203
|
-
padding-right: calc(var(--pico-form-element-spacing-horizontal) + 1.5rem) !important;
|
|
148
|
+
:where(input, select, textarea):not([type="checkbox"], [type="radio"], [type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"], [type="range"])[aria-invalid] {
|
|
204
149
|
padding-left: var(--pico-form-element-spacing-horizontal);
|
|
150
|
+
background-position: right .75rem center;
|
|
151
|
+
background-repeat: no-repeat;
|
|
152
|
+
background-size: 1rem;
|
|
153
|
+
padding-right: calc(var(--pico-form-element-spacing-horizontal) + 1.5rem) !important;
|
|
205
154
|
padding-inline-start: var(--pico-form-element-spacing-horizontal) !important;
|
|
206
155
|
padding-inline-end: calc(var(--pico-form-element-spacing-horizontal) + 1.5rem) !important;
|
|
207
|
-
background-position: center right 0.75rem;
|
|
208
|
-
background-size: 1rem auto;
|
|
209
|
-
background-repeat: no-repeat;
|
|
210
156
|
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
[type="radio"],
|
|
214
|
-
[type="date"],
|
|
215
|
-
[type="datetime-local"],
|
|
216
|
-
[type="month"],
|
|
217
|
-
[type="time"],
|
|
218
|
-
[type="week"],
|
|
219
|
-
[type="range"]
|
|
220
|
-
)[aria-invalid="false"]:not(select) {
|
|
157
|
+
|
|
158
|
+
:where(input, select, textarea):not([type="checkbox"], [type="radio"], [type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"], [type="range"])[aria-invalid="false"]:not(select) {
|
|
221
159
|
background-image: var(--pico-icon-valid);
|
|
222
160
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
[type="radio"],
|
|
226
|
-
[type="date"],
|
|
227
|
-
[type="datetime-local"],
|
|
228
|
-
[type="month"],
|
|
229
|
-
[type="time"],
|
|
230
|
-
[type="week"],
|
|
231
|
-
[type="range"]
|
|
232
|
-
)[aria-invalid="true"]:not(select) {
|
|
161
|
+
|
|
162
|
+
:where(input, select, textarea):not([type="checkbox"], [type="radio"], [type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"], [type="range"])[aria-invalid="true"]:not(select) {
|
|
233
163
|
background-image: var(--pico-icon-invalid);
|
|
234
164
|
}
|
|
165
|
+
|
|
235
166
|
:where(input, select, textarea)[aria-invalid="false"] {
|
|
236
167
|
--pico-border-color: var(--pico-form-element-valid-border-color);
|
|
237
168
|
}
|
|
169
|
+
|
|
238
170
|
:where(input, select, textarea)[aria-invalid="false"]:is(:active, :focus) {
|
|
239
171
|
--pico-border-color: var(--pico-form-element-valid-active-border-color) !important;
|
|
240
172
|
}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
[type="radio"]
|
|
244
|
-
) {
|
|
173
|
+
|
|
174
|
+
:where(input, select, textarea)[aria-invalid="false"]:is(:active, :focus):not([type="checkbox"], [type="radio"]) {
|
|
245
175
|
--pico-box-shadow: 0 0 0 var(--pico-outline-width) var(--pico-form-element-valid-focus-color) !important;
|
|
246
176
|
}
|
|
177
|
+
|
|
247
178
|
:where(input, select, textarea)[aria-invalid="true"] {
|
|
248
179
|
--pico-border-color: var(--pico-form-element-invalid-border-color);
|
|
249
180
|
}
|
|
181
|
+
|
|
250
182
|
:where(input, select, textarea)[aria-invalid="true"]:is(:active, :focus) {
|
|
251
183
|
--pico-border-color: var(--pico-form-element-invalid-active-border-color) !important;
|
|
252
184
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
[type="radio"]
|
|
256
|
-
) {
|
|
185
|
+
|
|
186
|
+
:where(input, select, textarea)[aria-invalid="true"]:is(:active, :focus):not([type="checkbox"], [type="radio"]) {
|
|
257
187
|
--pico-box-shadow: 0 0 0 var(--pico-outline-width) var(--pico-form-element-invalid-focus-color) !important;
|
|
258
188
|
}
|
|
259
189
|
|
|
260
|
-
[dir="rtl"]
|
|
261
|
-
:
|
|
262
|
-
[aria-invalid],
|
|
263
|
-
[aria-invalid="true"],
|
|
264
|
-
[aria-invalid="false"]
|
|
265
|
-
) {
|
|
266
|
-
background-position: center left 0.75rem;
|
|
190
|
+
[dir="rtl"] :where(input, select, textarea):not([type="checkbox"], [type="radio"]):is([aria-invalid], [aria-invalid="true"], [aria-invalid="false"]) {
|
|
191
|
+
background-position: .75rem;
|
|
267
192
|
}
|
|
268
193
|
|
|
269
|
-
input::placeholder,
|
|
270
|
-
input::-webkit-input-placeholder,
|
|
271
|
-
textarea::placeholder,
|
|
272
|
-
textarea::-webkit-input-placeholder,
|
|
273
|
-
select:invalid {
|
|
194
|
+
input::placeholder, input::-webkit-input-placeholder, textarea::placeholder, textarea::-webkit-input-placeholder, select:invalid {
|
|
274
195
|
color: var(--pico-form-element-placeholder-color);
|
|
275
196
|
opacity: 1;
|
|
276
197
|
}
|
|
277
198
|
|
|
278
|
-
input:not([type="checkbox"], [type="radio"]),
|
|
279
|
-
select,
|
|
280
|
-
textarea {
|
|
199
|
+
input:not([type="checkbox"], [type="radio"]), select, textarea {
|
|
281
200
|
margin-bottom: var(--pico-spacing);
|
|
282
201
|
}
|
|
283
202
|
|
|
284
203
|
select::-ms-expand {
|
|
204
|
+
background-color: #0000;
|
|
285
205
|
border: 0;
|
|
286
|
-
background-color: transparent;
|
|
287
206
|
}
|
|
207
|
+
|
|
288
208
|
select:not([multiple], [size]) {
|
|
289
209
|
padding-right: calc(var(--pico-form-element-spacing-horizontal) + 1.5rem);
|
|
290
210
|
padding-left: var(--pico-form-element-spacing-horizontal);
|
|
291
|
-
padding-inline-start: var(--pico-form-element-spacing-horizontal);
|
|
292
|
-
padding-inline-end: calc(var(--pico-form-element-spacing-horizontal) + 1.5rem);
|
|
293
211
|
background-image: var(--pico-icon-chevron);
|
|
294
|
-
background-position:
|
|
295
|
-
background-size: 1rem auto;
|
|
212
|
+
background-position: right .75rem center;
|
|
296
213
|
background-repeat: no-repeat;
|
|
214
|
+
background-size: 1rem;
|
|
215
|
+
padding-inline-start: var(--pico-form-element-spacing-horizontal);
|
|
216
|
+
padding-inline-end: calc(var(--pico-form-element-spacing-horizontal) + 1.5rem);
|
|
297
217
|
}
|
|
218
|
+
|
|
298
219
|
select[multiple] option:checked {
|
|
299
220
|
background: var(--pico-form-element-selected-background-color);
|
|
300
221
|
color: var(--pico-form-element-color);
|
|
301
222
|
}
|
|
302
223
|
|
|
303
224
|
[dir="rtl"] select:not([multiple], [size]) {
|
|
304
|
-
background-position:
|
|
225
|
+
background-position: .75rem;
|
|
305
226
|
}
|
|
306
227
|
|
|
307
228
|
textarea {
|
|
308
|
-
display: block;
|
|
309
229
|
resize: vertical;
|
|
230
|
+
display: block;
|
|
310
231
|
}
|
|
232
|
+
|
|
311
233
|
textarea[aria-invalid] {
|
|
312
|
-
--pico-icon-height: calc(
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
);
|
|
316
|
-
background-position: top right 0.75rem !important;
|
|
234
|
+
--pico-icon-height: calc(1rem * var(--pico-line-height) + var(--pico-form-element-spacing-vertical) * 2 +
|
|
235
|
+
var(--pico-border-width) * 2);
|
|
236
|
+
background-position: right .75rem top !important;
|
|
317
237
|
background-size: 1rem var(--pico-icon-height) !important;
|
|
318
238
|
}
|
|
319
239
|
|
|
320
240
|
:where(input, select, textarea, fieldset, .grid) + small {
|
|
321
|
-
display: block;
|
|
322
241
|
width: 100%;
|
|
323
|
-
margin-top: calc(var(--pico-spacing) *
|
|
242
|
+
margin-top: calc(var(--pico-spacing) * -.75);
|
|
324
243
|
margin-bottom: var(--pico-spacing);
|
|
325
244
|
color: var(--pico-muted-color);
|
|
245
|
+
display: block;
|
|
326
246
|
}
|
|
247
|
+
|
|
327
248
|
:where(input, select, textarea, fieldset, .grid)[aria-invalid="false"] + small {
|
|
328
249
|
color: var(--pico-ins-color);
|
|
329
250
|
}
|
|
251
|
+
|
|
330
252
|
:where(input, select, textarea, fieldset, .grid)[aria-invalid="true"] + small {
|
|
331
253
|
color: var(--pico-del-color);
|
|
332
254
|
}
|
|
333
255
|
|
|
334
256
|
label > :where(input, select, textarea) {
|
|
335
|
-
margin-top: calc(var(--pico-spacing) *
|
|
257
|
+
margin-top: calc(var(--pico-spacing) * .25);
|
|
336
258
|
}
|
|
337
259
|
|
|
338
260
|
}
|
|
@@ -1,64 +1,54 @@
|
|
|
1
1
|
@layer blades {
|
|
2
|
-
|
|
3
|
-
* Checkboxes, Radios and Switches
|
|
4
|
-
*/
|
|
5
|
-
:where(:scope),
|
|
6
|
-
:host {
|
|
2
|
+
:where(:scope), :host {
|
|
7
3
|
--pico-icon-checkbox: 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(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
|
|
8
4
|
--pico-icon-minus: 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(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");
|
|
9
5
|
}
|
|
10
|
-
|
|
11
|
-
:host {
|
|
6
|
+
|
|
7
|
+
:where(:scope, [data-theme="light"], [data-theme="dark"]), :host {
|
|
12
8
|
--pico-switch-background-color: light-dark(#bfc7d9, #333c4e);
|
|
13
9
|
--pico-switch-checked-background-color: var(--pico-primary-background);
|
|
14
10
|
--pico-switch-color: #fff;
|
|
15
|
-
--pico-switch-thumb-box-shadow: 0 0 0
|
|
11
|
+
--pico-switch-thumb-box-shadow: 0 0 0 #0000;
|
|
16
12
|
}
|
|
17
13
|
|
|
18
14
|
label:has([type="checkbox"], [type="radio"]) {
|
|
19
|
-
width: -moz-fit-content;
|
|
20
|
-
width: fit-content;
|
|
21
15
|
cursor: pointer;
|
|
16
|
+
width: fit-content;
|
|
22
17
|
}
|
|
23
18
|
|
|
24
|
-
[type="checkbox"],
|
|
25
|
-
[type="radio"] {
|
|
19
|
+
[type="checkbox"], [type="radio"] {
|
|
26
20
|
-webkit-appearance: none;
|
|
27
21
|
-moz-appearance: none;
|
|
28
22
|
appearance: none;
|
|
29
|
-
|
|
30
|
-
height: 1.25em;
|
|
31
|
-
margin-top: -0.125em;
|
|
32
|
-
margin-inline-end: 0.5em;
|
|
23
|
+
margin-top: -.125em;
|
|
33
24
|
border-width: var(--pico-border-width);
|
|
34
25
|
vertical-align: middle;
|
|
35
26
|
cursor: pointer;
|
|
27
|
+
width: 1.25em;
|
|
28
|
+
height: 1.25em;
|
|
29
|
+
margin-inline-end: .5em;
|
|
36
30
|
}
|
|
37
|
-
|
|
38
|
-
[type="radio"]::-ms-check {
|
|
31
|
+
|
|
32
|
+
[type="checkbox"]::-ms-check, [type="radio"]::-ms-check {
|
|
39
33
|
display: none;
|
|
40
34
|
}
|
|
41
|
-
|
|
42
|
-
[type="checkbox"]:checked:active,
|
|
43
|
-
[type="checkbox"]:checked:focus,
|
|
44
|
-
[type="radio"]:checked,
|
|
45
|
-
[type="radio"]:checked:active,
|
|
46
|
-
[type="radio"]:checked:focus {
|
|
35
|
+
|
|
36
|
+
[type="checkbox"]:checked, [type="checkbox"]:checked:active, [type="checkbox"]:checked:focus, [type="radio"]:checked, [type="radio"]:checked:active, [type="radio"]:checked:focus {
|
|
47
37
|
--pico-background-color: var(--pico-primary-background);
|
|
48
38
|
--pico-border-color: var(--pico-primary-border);
|
|
49
39
|
background-image: var(--pico-icon-checkbox);
|
|
50
40
|
background-position: center;
|
|
51
|
-
background-size: 0.75em auto;
|
|
52
41
|
background-repeat: no-repeat;
|
|
42
|
+
background-size: .75em;
|
|
53
43
|
}
|
|
54
|
-
|
|
55
|
-
[type="radio"] ~ label {
|
|
56
|
-
display: inline-block;
|
|
57
|
-
margin-bottom: 0;
|
|
44
|
+
|
|
45
|
+
[type="checkbox"] ~ label, [type="radio"] ~ label {
|
|
58
46
|
cursor: pointer;
|
|
47
|
+
margin-bottom: 0;
|
|
48
|
+
display: inline-block;
|
|
59
49
|
}
|
|
60
|
-
|
|
61
|
-
[type="radio"] ~ label:not(:last-of-type) {
|
|
50
|
+
|
|
51
|
+
[type="checkbox"] ~ label:not(:last-of-type), [type="radio"] ~ label:not(:last-of-type) {
|
|
62
52
|
margin-inline-end: 1em;
|
|
63
53
|
}
|
|
64
54
|
|
|
@@ -67,97 +57,78 @@ label:has([type="checkbox"], [type="radio"]) {
|
|
|
67
57
|
--pico-border-color: var(--pico-primary-border);
|
|
68
58
|
background-image: var(--pico-icon-minus);
|
|
69
59
|
background-position: center;
|
|
70
|
-
background-size: 0.75em auto;
|
|
71
60
|
background-repeat: no-repeat;
|
|
61
|
+
background-size: .75em;
|
|
72
62
|
}
|
|
73
63
|
|
|
74
64
|
[type="radio"] {
|
|
75
65
|
border-radius: 50%;
|
|
76
66
|
}
|
|
77
|
-
|
|
78
|
-
[type="radio"]:checked:active,
|
|
79
|
-
[type="radio"]:checked:focus {
|
|
67
|
+
|
|
68
|
+
[type="radio"]:checked, [type="radio"]:checked:active, [type="radio"]:checked:focus {
|
|
80
69
|
--pico-background-color: var(--pico-primary-inverse);
|
|
81
|
-
border-width: 0.35em;
|
|
82
70
|
background-image: none;
|
|
71
|
+
border-width: .35em;
|
|
83
72
|
}
|
|
84
73
|
|
|
85
74
|
[type="checkbox"][role="switch"] {
|
|
86
75
|
--pico-background-color: var(--pico-switch-background-color);
|
|
87
76
|
--pico-color: var(--pico-switch-color);
|
|
88
|
-
width: 2.25em;
|
|
89
|
-
height: 1.25em;
|
|
90
77
|
border: var(--pico-border-width) solid var(--pico-border-color);
|
|
91
|
-
border-radius: 1.25em;
|
|
92
78
|
background-color: var(--pico-background-color);
|
|
79
|
+
border-radius: 1.25em;
|
|
80
|
+
width: 2.25em;
|
|
81
|
+
height: 1.25em;
|
|
93
82
|
line-height: 1.25em;
|
|
94
83
|
}
|
|
84
|
+
|
|
95
85
|
[type="checkbox"][role="switch"]:not([aria-invalid]) {
|
|
96
86
|
--pico-border-color: var(--pico-switch-background-color);
|
|
97
87
|
}
|
|
88
|
+
|
|
98
89
|
[type="checkbox"][role="switch"]:before {
|
|
99
|
-
display: block;
|
|
100
90
|
aspect-ratio: 1;
|
|
101
|
-
height: 100%;
|
|
102
|
-
border-radius: 50%;
|
|
103
91
|
background-color: var(--pico-color);
|
|
92
|
+
height: 100%;
|
|
104
93
|
box-shadow: var(--pico-switch-thumb-box-shadow);
|
|
105
94
|
content: "";
|
|
106
|
-
|
|
95
|
+
border-radius: 50%;
|
|
96
|
+
transition: margin .1s ease-in-out;
|
|
97
|
+
display: block;
|
|
107
98
|
}
|
|
99
|
+
|
|
108
100
|
[type="checkbox"][role="switch"]:focus {
|
|
109
101
|
--pico-background-color: var(--pico-switch-background-color);
|
|
110
102
|
--pico-border-color: var(--pico-switch-background-color);
|
|
111
103
|
}
|
|
104
|
+
|
|
112
105
|
[type="checkbox"][role="switch"]:checked {
|
|
113
106
|
--pico-background-color: var(--pico-switch-checked-background-color);
|
|
114
107
|
--pico-border-color: var(--pico-switch-checked-background-color);
|
|
115
108
|
background-image: none;
|
|
116
109
|
}
|
|
117
|
-
|
|
118
|
-
|
|
110
|
+
|
|
111
|
+
[type="checkbox"][role="switch"]:checked:before {
|
|
112
|
+
margin-inline-start: 1em;
|
|
119
113
|
}
|
|
114
|
+
|
|
120
115
|
[type="checkbox"][role="switch"][disabled] {
|
|
121
116
|
--pico-background-color: var(--pico-border-color);
|
|
122
117
|
}
|
|
123
118
|
|
|
124
|
-
[type="checkbox"][aria-invalid="false"]:checked,
|
|
125
|
-
[type="checkbox"][aria-invalid="false"]:checked:active,
|
|
126
|
-
[type="checkbox"][aria-invalid="false"]:checked:focus,
|
|
127
|
-
[type="checkbox"][role="switch"][aria-invalid="false"]:checked,
|
|
128
|
-
[type="checkbox"][role="switch"][aria-invalid="false"]:checked:active,
|
|
129
|
-
[type="checkbox"][role="switch"][aria-invalid="false"]:checked:focus {
|
|
119
|
+
[type="checkbox"][aria-invalid="false"]:checked, [type="checkbox"][aria-invalid="false"]:checked:active, [type="checkbox"][aria-invalid="false"]:checked:focus, [type="checkbox"][role="switch"][aria-invalid="false"]:checked, [type="checkbox"][role="switch"][aria-invalid="false"]:checked:active, [type="checkbox"][role="switch"][aria-invalid="false"]:checked:focus {
|
|
130
120
|
--pico-background-color: var(--pico-form-element-valid-border-color);
|
|
131
121
|
}
|
|
132
|
-
|
|
133
|
-
[type="checkbox"]:checked:active[aria-invalid="true"],
|
|
134
|
-
[type="checkbox"]:checked:focus[aria-invalid="true"],
|
|
135
|
-
[type="checkbox"][role="switch"]:checked[aria-invalid="true"],
|
|
136
|
-
[type="checkbox"][role="switch"]:checked:active[aria-invalid="true"],
|
|
137
|
-
[type="checkbox"][role="switch"]:checked:focus[aria-invalid="true"] {
|
|
122
|
+
|
|
123
|
+
[type="checkbox"]:checked[aria-invalid="true"], [type="checkbox"]:checked:active[aria-invalid="true"], [type="checkbox"]:checked:focus[aria-invalid="true"], [type="checkbox"][role="switch"]:checked[aria-invalid="true"], [type="checkbox"][role="switch"]:checked:active[aria-invalid="true"], [type="checkbox"][role="switch"]:checked:focus[aria-invalid="true"] {
|
|
138
124
|
--pico-background-color: var(--pico-form-element-invalid-border-color);
|
|
139
125
|
}
|
|
140
126
|
|
|
141
|
-
[type="checkbox"][aria-invalid="false"]:checked,
|
|
142
|
-
[type="checkbox"][aria-invalid="false"]:checked:active,
|
|
143
|
-
[type="checkbox"][aria-invalid="false"]:checked:focus,
|
|
144
|
-
[type="radio"][aria-invalid="false"]:checked,
|
|
145
|
-
[type="radio"][aria-invalid="false"]:checked:active,
|
|
146
|
-
[type="radio"][aria-invalid="false"]:checked:focus,
|
|
147
|
-
[type="checkbox"][role="switch"][aria-invalid="false"]:checked,
|
|
148
|
-
[type="checkbox"][role="switch"][aria-invalid="false"]:checked:active,
|
|
149
|
-
[type="checkbox"][role="switch"][aria-invalid="false"]:checked:focus {
|
|
127
|
+
[type="checkbox"][aria-invalid="false"]:checked, [type="checkbox"][aria-invalid="false"]:checked:active, [type="checkbox"][aria-invalid="false"]:checked:focus, [type="radio"][aria-invalid="false"]:checked, [type="radio"][aria-invalid="false"]:checked:active, [type="radio"][aria-invalid="false"]:checked:focus, [type="checkbox"][role="switch"][aria-invalid="false"]:checked, [type="checkbox"][role="switch"][aria-invalid="false"]:checked:active, [type="checkbox"][role="switch"][aria-invalid="false"]:checked:focus {
|
|
150
128
|
--pico-border-color: var(--pico-form-element-valid-border-color);
|
|
151
129
|
}
|
|
152
|
-
|
|
153
|
-
[type="checkbox"]:checked:active[aria-invalid="true"],
|
|
154
|
-
[type="checkbox"]:checked:focus[aria-invalid="true"],
|
|
155
|
-
[type="radio"]:checked[aria-invalid="true"],
|
|
156
|
-
[type="radio"]:checked:active[aria-invalid="true"],
|
|
157
|
-
[type="radio"]:checked:focus[aria-invalid="true"],
|
|
158
|
-
[type="checkbox"][role="switch"]:checked[aria-invalid="true"],
|
|
159
|
-
[type="checkbox"][role="switch"]:checked:active[aria-invalid="true"],
|
|
160
|
-
[type="checkbox"][role="switch"]:checked:focus[aria-invalid="true"] {
|
|
130
|
+
|
|
131
|
+
[type="checkbox"]:checked[aria-invalid="true"], [type="checkbox"]:checked:active[aria-invalid="true"], [type="checkbox"]:checked:focus[aria-invalid="true"], [type="radio"]:checked[aria-invalid="true"], [type="radio"]:checked:active[aria-invalid="true"], [type="radio"]:checked:focus[aria-invalid="true"], [type="checkbox"][role="switch"]:checked[aria-invalid="true"], [type="checkbox"][role="switch"]:checked:active[aria-invalid="true"], [type="checkbox"][role="switch"]:checked:focus[aria-invalid="true"] {
|
|
161
132
|
--pico-border-color: var(--pico-form-element-invalid-border-color);
|
|
162
133
|
}
|
|
163
134
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@layer blades {
|
|
2
|
+
/*!
|
|
3
|
+
* Float Label CSS v2 by Blades CSS 🥷🏷️
|
|
4
|
+
* Copyright 2016–2026 (https://blades.ninja/css/float-label/)
|
|
5
|
+
* Licensed under MIT
|
|
6
|
+
*/
|
|
7
|
+
label:has( > span):has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select), .has-float-label {
|
|
8
|
+
display: block;
|
|
9
|
+
position: relative;
|
|
10
|
+
|
|
11
|
+
& > span, & label {
|
|
12
|
+
cursor: text;
|
|
13
|
+
font-size: 75%;
|
|
14
|
+
position: absolute;
|
|
15
|
+
top: 0;
|
|
16
|
+
left: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
& :placeholder-shown:not(:focus)::placeholder {
|
|
20
|
+
opacity: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:has(:placeholder-shown:not(:focus)) {
|
|
24
|
+
& > span, & label {
|
|
25
|
+
font-size: inherit;
|
|
26
|
+
opacity: .5;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@layer blades {
|
|
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;
|
|
8
|
+
}
|
|
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;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&:has(:placeholder-shown:not(:focus)) {
|
|
22
|
+
& > span, & label {
|
|
23
|
+
padding-block: .75rem;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
}
|