@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
@@ -3,205 +3,52 @@
3
3
  * Copyright 2016–2026 (https://blades.ninja/css/float-label/)
4
4
  * Licensed under MIT
5
5
  */
6
- /*\3c !--section:docs-->
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
- Finally, we detect if placeholder is shown, but not in focus. That means we can safely hide it, and enlarge the float label instead:
23
- ```css */
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
- label:has(> span):has(
47
- input:not([type="checkbox"], [type="radio"], [type="range"]),
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
- label:has(> span):has(
68
- input:not([type="checkbox"], [type="radio"], [type="range"]),
69
- textarea,
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: 50%;
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
- 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.
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
- label:has(> span):has(
102
- input:not([type="checkbox"], [type="radio"], [type="range"]),
103
- textarea,
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
- /* Enlarged state */
109
- }
110
- /* Default/fallback state */
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
- label:has(> span):has(
184
- input:not([type="checkbox"], [type="radio"], [type="range"]),
185
- textarea,
186
- select
187
- ):has(*:-moz-placeholder:not(:focus)) > span, label:has(> span):has(
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
+ }
@@ -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}label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select)>span,label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select) label,.has-float-label>span,.has-float-label label{cursor:text;font-size:75%;position:absolute;top:0;left:0}label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select) :placeholder-shown:not(:focus)::-moz-placeholder,.has-float-label :placeholder-shown:not(:focus)::-moz-placeholder{opacity:0}label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select) :-moz-placeholder-shown:not(:focus)::placeholder,.has-float-label :-moz-placeholder-shown:not(:focus)::placeholder{opacity:0}label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select) :placeholder-shown:not(:focus)::placeholder,.has-float-label :placeholder-shown:not(:focus)::placeholder{opacity:0}label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select):has(:placeholder-shown:not(:focus))>span,label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select):has(:placeholder-shown:not(:focus)) label,.has-float-label:has(:placeholder-shown:not(:focus))>span,.has-float-label:has(:placeholder-shown:not(:focus)) label{font-size:inherit;opacity:.5}label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select):has(:placeholder-shown:not(:focus))>span,label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select):has(:placeholder-shown:not(:focus)) label,.has-float-label:has(:placeholder-shown:not(:focus))>span,.has-float-label:has(:placeholder-shown:not(:focus)) label{font-size:inherit;opacity:.5}label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select)>span,label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select) label,.has-float-label>span,.has-float-label label{opacity:.75;padding-block-start:.25rem;padding-inline-start:calc(1rem + 1px);transition:all .25s}label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select) input,label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select) textarea,label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select) select,.has-float-label input,.has-float-label textarea,.has-float-label select{margin-block-start:0;padding-block:1.125rem .375rem;padding-inline-start:1rem}label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select) input::-moz-placeholder,label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select) textarea::-moz-placeholder,label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select) select::-moz-placeholder,.has-float-label input::-moz-placeholder,.has-float-label textarea::-moz-placeholder,.has-float-label select::-moz-placeholder{opacity:1;-moz-transition:all .25s;transition:all .25s}label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select) input::placeholder,label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select) textarea::placeholder,label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select) select::placeholder,.has-float-label input::placeholder,.has-float-label textarea::placeholder,.has-float-label select::placeholder{opacity:1;transition:all .25s}label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select):has(:placeholder-shown:not(:focus))>span,label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select):has(:placeholder-shown:not(:focus)) label,.has-float-label:has(:placeholder-shown:not(:focus))>span,.has-float-label:has(:placeholder-shown:not(:focus)) label{padding-block:.75rem}label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select):has(:placeholder-shown:not(:focus))>span,label:has(>span):has(input:not([type=checkbox],[type=radio],[type=range]),textarea,select):has(:placeholder-shown:not(:focus)) label,.has-float-label:has(:placeholder-shown:not(:focus))>span,.has-float-label:has(:placeholder-shown:not(:focus)) label{padding-block:.75rem}
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}}}