@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.
- package/.prettierrc.json +0 -7
- package/README.md +27 -50
- package/_includes/.prettierrc.json +12 -0
- package/_includes/package.json +10 -0
- package/css/blades.css +941 -1804
- package/css/blades.min.css +11 -1
- package/css/blades.ninja.css +1123 -2264
- 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 +941 -1804
- 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 +44 -59
- 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 +7 -15
- 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 +5 -19
- 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 +11 -23
- 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 +20 -47
- 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 +13 -85
- package/css/layered/forms/float-label/theme.css +22 -104
- package/css/layered/forms/float-label.css +34 -187
- 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 +4 -24
- 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 +4 -16
- 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 +43 -31
- package/src/blades/_index.css +9 -9
- package/src/blades/components/_dropdown-popover.css +2 -0
- package/src/blades/components/_modal-modern.css +2 -0
- package/src/blades/forms/float-label/_index.css +2 -2
- 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 +8 -9
- package/src/ninja/_table-helpers.css +4 -4
- package/src/ninja/_table-responsive.css +5 -5
- package/src/ninja/_utilities.css +1 -1
- 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/src/ninja/_scroll-to.css +0 -10
package/css/float-label.css
CHANGED
|
@@ -3,205 +3,52 @@
|
|
|
3
3
|
* Copyright 2016–2026 (https://blades.ninja/css/float-label/)
|
|
4
4
|
* Licensed under MIT
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
First, we target either:
|
|
9
|
-
1. `<label>` which `:has` inner form inputs (classless approach)
|
|
10
|
-
2. or explicit `.has-float-label` class (explicit approach)
|
|
11
|
-
|
|
12
|
-
```css */
|
|
13
|
-
label:has(> span):has(
|
|
14
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
15
|
-
textarea,
|
|
16
|
-
select
|
|
17
|
-
),
|
|
18
|
-
.has-float-label {
|
|
6
|
+
label:has( > span):has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select), .has-float-label {
|
|
19
7
|
display: block;
|
|
20
8
|
position: relative;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/*```
|
|
26
|
-
Then, we define the default/fallback state (when the float label should be minimized):
|
|
27
|
-
```css */
|
|
28
|
-
label:has(> span):has(
|
|
29
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
30
|
-
textarea,
|
|
31
|
-
select
|
|
32
|
-
) > span,
|
|
33
|
-
label:has(> span):has(
|
|
34
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
35
|
-
textarea,
|
|
36
|
-
select
|
|
37
|
-
) label,
|
|
38
|
-
.has-float-label > span,
|
|
39
|
-
.has-float-label label {
|
|
9
|
+
|
|
10
|
+
& > span, & label {
|
|
11
|
+
cursor: text;
|
|
12
|
+
font-size: 75%;
|
|
40
13
|
position: absolute;
|
|
41
14
|
top: 0;
|
|
42
15
|
left: 0;
|
|
43
|
-
font-size: 75%;
|
|
44
|
-
cursor: text;
|
|
45
16
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
textarea,
|
|
49
|
-
select
|
|
50
|
-
) *:placeholder-shown:not(:focus)::-moz-placeholder, .has-float-label *:placeholder-shown:not(:focus)::-moz-placeholder {
|
|
51
|
-
opacity: 0;
|
|
52
|
-
}
|
|
53
|
-
label:has(> span):has(
|
|
54
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
55
|
-
textarea,
|
|
56
|
-
select
|
|
57
|
-
) *:-moz-placeholder:not(:focus)::placeholder, .has-float-label *:-moz-placeholder:not(:focus)::placeholder {
|
|
58
|
-
opacity: 0;
|
|
59
|
-
}
|
|
60
|
-
label:has(> span):has(
|
|
61
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
62
|
-
textarea,
|
|
63
|
-
select
|
|
64
|
-
) *:placeholder-shown:not(:focus)::placeholder, .has-float-label *:placeholder-shown:not(:focus)::placeholder {
|
|
17
|
+
|
|
18
|
+
& :placeholder-shown:not(:focus)::placeholder {
|
|
65
19
|
opacity: 0;
|
|
66
20
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
select
|
|
71
|
-
):has(*:-moz-placeholder:not(:focus)) > span, label:has(> span):has(
|
|
72
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
73
|
-
textarea,
|
|
74
|
-
select
|
|
75
|
-
):has(*:-moz-placeholder:not(:focus)) label, .has-float-label:has(*:-moz-placeholder:not(:focus)) > span, .has-float-label:has(*:-moz-placeholder:not(:focus)) label {
|
|
76
|
-
font-size: inherit;
|
|
77
|
-
opacity: 50%;
|
|
78
|
-
}
|
|
79
|
-
label:has(> span):has(
|
|
80
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
81
|
-
textarea,
|
|
82
|
-
select
|
|
83
|
-
):has(*:placeholder-shown:not(:focus)) > span,
|
|
84
|
-
label:has(> span):has(
|
|
85
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
86
|
-
textarea,
|
|
87
|
-
select
|
|
88
|
-
):has(*:placeholder-shown:not(:focus)) label,
|
|
89
|
-
.has-float-label:has(*:placeholder-shown:not(:focus)) > span,
|
|
90
|
-
.has-float-label:has(*:placeholder-shown:not(:focus)) label {
|
|
21
|
+
|
|
22
|
+
&:has(:placeholder-shown:not(:focus)) {
|
|
23
|
+
& > span, & label {
|
|
91
24
|
font-size: inherit;
|
|
92
|
-
opacity:
|
|
25
|
+
opacity: .5;
|
|
93
26
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
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.
|
|
27
|
+
}
|
|
28
|
+
}
|
|
97
29
|
|
|
98
|
-
|
|
30
|
+
label:has( > span):has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select), .has-float-label {
|
|
31
|
+
& > span, & label {
|
|
32
|
+
opacity: .75;
|
|
33
|
+
padding-block-start: .25rem;
|
|
34
|
+
padding-inline-start: calc(1rem + 1px);
|
|
35
|
+
transition: all .25s;
|
|
36
|
+
}
|
|
99
37
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
select
|
|
105
|
-
),
|
|
106
|
-
.has-float-label {
|
|
38
|
+
& input, & textarea, & select {
|
|
39
|
+
margin-block-start: 0;
|
|
40
|
+
padding-block: 1.125rem .375rem;
|
|
41
|
+
padding-inline-start: 1rem;
|
|
107
42
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
label:has(> span):has(
|
|
112
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
113
|
-
textarea,
|
|
114
|
-
select
|
|
115
|
-
) > span,
|
|
116
|
-
label:has(> span):has(
|
|
117
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
118
|
-
textarea,
|
|
119
|
-
select
|
|
120
|
-
) label,
|
|
121
|
-
.has-float-label > span,
|
|
122
|
-
.has-float-label label {
|
|
123
|
-
padding-inline-start: calc(1rem + 1px); /* match Pico's padding + border */
|
|
124
|
-
padding-block-start: 0.25rem;
|
|
125
|
-
opacity: 75%;
|
|
126
|
-
transition: all 0.25s;
|
|
127
|
-
}
|
|
128
|
-
label:has(> span):has(
|
|
129
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
130
|
-
textarea,
|
|
131
|
-
select
|
|
132
|
-
) input,
|
|
133
|
-
label:has(> span):has(
|
|
134
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
135
|
-
textarea,
|
|
136
|
-
select
|
|
137
|
-
) textarea,
|
|
138
|
-
label:has(> span):has(
|
|
139
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
140
|
-
textarea,
|
|
141
|
-
select
|
|
142
|
-
) select,
|
|
143
|
-
.has-float-label input,
|
|
144
|
-
.has-float-label textarea,
|
|
145
|
-
.has-float-label select {
|
|
146
|
-
margin-block-start: 0; /* reset Pico */
|
|
147
|
-
padding-inline-start: 1rem; /* match Pico */
|
|
148
|
-
padding-block: 1.125rem 0.375rem; /* match Pico's total: 2 x 0.75rem = 1.5rem */
|
|
149
|
-
}
|
|
150
|
-
label:has(> span):has(
|
|
151
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
152
|
-
textarea,
|
|
153
|
-
select
|
|
154
|
-
) input::-moz-placeholder, label:has(> span):has(
|
|
155
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
156
|
-
textarea,
|
|
157
|
-
select
|
|
158
|
-
) textarea::-moz-placeholder, label:has(> span):has(
|
|
159
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
160
|
-
textarea,
|
|
161
|
-
select
|
|
162
|
-
) select::-moz-placeholder, .has-float-label input::-moz-placeholder, .has-float-label textarea::-moz-placeholder, .has-float-label select::-moz-placeholder {
|
|
163
|
-
opacity: 100%;
|
|
164
|
-
-moz-transition: all 0.25s;
|
|
165
|
-
transition: all 0.25s;
|
|
166
|
-
}
|
|
167
|
-
label:has(> span):has(
|
|
168
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
169
|
-
textarea,
|
|
170
|
-
select
|
|
171
|
-
) input::placeholder, label:has(> span):has(
|
|
172
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
173
|
-
textarea,
|
|
174
|
-
select
|
|
175
|
-
) textarea::placeholder, label:has(> span):has(
|
|
176
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
177
|
-
textarea,
|
|
178
|
-
select
|
|
179
|
-
) select::placeholder, .has-float-label input::placeholder, .has-float-label textarea::placeholder, .has-float-label select::placeholder {
|
|
180
|
-
opacity: 100%;
|
|
181
|
-
transition: all 0.25s;
|
|
43
|
+
&::placeholder {
|
|
44
|
+
opacity: 1;
|
|
45
|
+
transition: all .25s;
|
|
182
46
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
189
|
-
textarea,
|
|
190
|
-
select
|
|
191
|
-
):has(*:-moz-placeholder:not(:focus)) label, .has-float-label:has(*:-moz-placeholder:not(:focus)) > span, .has-float-label:has(*:-moz-placeholder:not(:focus)) label {
|
|
192
|
-
padding-block: 0.75rem; /* match Pico */
|
|
193
|
-
}
|
|
194
|
-
label:has(> span):has(
|
|
195
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
196
|
-
textarea,
|
|
197
|
-
select
|
|
198
|
-
):has(*:placeholder-shown:not(:focus)) > span,
|
|
199
|
-
label:has(> span):has(
|
|
200
|
-
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
201
|
-
textarea,
|
|
202
|
-
select
|
|
203
|
-
):has(*:placeholder-shown:not(:focus)) label,
|
|
204
|
-
.has-float-label:has(*:placeholder-shown:not(:focus)) > span,
|
|
205
|
-
.has-float-label:has(*:placeholder-shown:not(:focus)) label {
|
|
206
|
-
padding-block: 0.75rem; /* match Pico */
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:has(:placeholder-shown:not(:focus)) {
|
|
50
|
+
& > span, & label {
|
|
51
|
+
padding-block: .75rem;
|
|
207
52
|
}
|
|
53
|
+
}
|
|
54
|
+
}
|
package/css/float-label.min.css
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* Copyright 2016–2026 (https://blades.ninja/css/float-label/)
|
|
4
4
|
* Licensed under MIT
|
|
5
5
|
*/
|
|
6
|
-
label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select),.has-float-label{display:block;position:relative
|
|
6
|
+
label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select),.has-float-label{display:block;position:relative;&>span,& label{cursor:text;font-size:75%;position:absolute;top:0;left:0}& :placeholder-shown:not(:focus)::placeholder{opacity:0}&:has(:placeholder-shown:not(:focus)){&>span,& label{font-size:inherit;opacity:.5}}}label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select),.has-float-label{&>span,& label{opacity:.75;padding-block-start:.25rem;padding-inline-start:calc(1rem + 1px);transition:all .25s}& input,& textarea,& select{margin-block-start:0;padding-block:1.125rem .375rem;padding-inline-start:1rem;&::placeholder{opacity:1;transition:all .25s}}&:has(:placeholder-shown:not(:focus)){&>span,& label{padding-block:.75rem}}}
|