@anyblades/blades 3.1.0-alpha.1 → 3.1.0-beta.2

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 (108) hide show
  1. package/README.md +78 -3
  2. package/css/blades.css +371 -978
  3. package/css/blades.min.css +74 -37
  4. package/css/blades.ninja.css +4057 -0
  5. package/css/blades.ninja.min.css +190 -0
  6. package/css/float-label.css +207 -0
  7. package/css/float-label.min.css +55 -0
  8. package/css/{pico.layered.css → layered/blades.layered.css} +654 -397
  9. package/css/layered/blades.layered.min.css +184 -0
  10. package/css/layered/compact.css +54 -0
  11. package/css/layered/components/accordion.css +85 -0
  12. package/css/layered/components/card.css +48 -0
  13. package/css/layered/components/dropdown.css +191 -0
  14. package/css/layered/components/group.css +208 -0
  15. package/css/layered/components/loading.css +43 -0
  16. package/css/layered/components/modal.css +158 -0
  17. package/css/layered/components/nav.css +117 -0
  18. package/css/layered/components/progress.css +76 -0
  19. package/css/layered/components/tooltip.css +176 -0
  20. package/css/layered/components.css +1082 -0
  21. package/css/layered/content/button.css +208 -0
  22. package/css/layered/content/code.css +64 -0
  23. package/css/layered/content/embedded-content.css +41 -0
  24. package/css/layered/content/figure.css +15 -0
  25. package/css/layered/content/link.css +84 -0
  26. package/css/layered/content/misc.css +22 -0
  27. package/css/layered/content/table.css +33 -0
  28. package/css/layered/content/typography.css +159 -0
  29. package/css/layered/content.css +611 -0
  30. package/css/layered/forms/basics.css +338 -0
  31. package/css/layered/forms/checkbox-radio-switch.css +164 -0
  32. package/css/layered/forms/input-color.css +20 -0
  33. package/css/layered/forms/input-datetime.css +57 -0
  34. package/css/layered/forms/input-file.css +29 -0
  35. package/css/layered/forms/input-range.css +121 -0
  36. package/css/layered/forms/input-search.css +66 -0
  37. package/css/layered/forms.css +778 -0
  38. package/css/layered/layout/container.css +42 -0
  39. package/css/layered/layout/document.css +48 -0
  40. package/css/layered/layout/grid.css +22 -0
  41. package/css/layered/layout/landmarks.css +12 -0
  42. package/css/layered/layout/overflow-auto.css +9 -0
  43. package/css/layered/layout/section.css +9 -0
  44. package/css/layered/layout.css +119 -0
  45. package/css/layered/utilities.css +35 -0
  46. package/css/layered/variables.css +365 -0
  47. package/css/pico.conditional.css +229 -396
  48. package/css/pico.conditional.min.css +42 -31
  49. package/css/pico.css +229 -396
  50. package/css/pico.min.css +42 -31
  51. package/package.json +24 -11
  52. package/src/_compact.css +51 -0
  53. package/src/blades/_index.css +23 -0
  54. package/src/blades/float-label/_index.css +2 -0
  55. package/src/{standalone/forms/_float-label.theme.css → blades/float-label/_theme.css} +5 -1
  56. package/src/blades.css +3 -2
  57. package/src/blades.ninja.css +3 -0
  58. package/src/float-label.css +1 -0
  59. package/src/ninja/_index.css +19 -0
  60. package/src/{standalone → ninja}/_theme.css +0 -2
  61. package/src/{ninja.css → ninja/_utilities.css} +55 -6
  62. package/src/pico/_variables.css +77 -386
  63. package/src/pico/components/_accordion.css +8 -0
  64. package/src/pico/components/_card.css +14 -0
  65. package/src/pico/components/_dropdown.css +9 -0
  66. package/src/pico/components/_group.css +38 -0
  67. package/src/pico/components/_loading.css +9 -0
  68. package/src/pico/components/_modal.css +13 -0
  69. package/src/pico/components/_nav.css +6 -0
  70. package/src/pico/components/_progress.css +6 -0
  71. package/src/pico/components/_tooltip.css +6 -0
  72. package/src/pico/content/_button.css +1 -1
  73. package/src/pico/forms/_checkbox-radio-switch.css +13 -0
  74. package/src/pico/forms/_input-datetime.css +6 -0
  75. package/src/pico/forms/_input-range.css +9 -0
  76. package/src/pico/forms/_input-search.css +5 -0
  77. package/src/pico/layout/_document.css +9 -0
  78. package/src/pico/layout/_index.css +0 -1
  79. package/src/pico/layout/_landmarks.css +1 -9
  80. package/src/pico.css +1 -0
  81. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -25
  82. package/.github/ISSUE_TEMPLATE/config.yml +0 -8
  83. package/.prettierignore +0 -3
  84. package/CODE_OF_CONDUCT.md +0 -92
  85. package/context7.json +0 -4
  86. package/css/blades.standalone.css +0 -860
  87. package/css/blades.standalone.min.css +0 -37
  88. package/css/ninja.css +0 -83
  89. package/css/ninja.min.css +0 -5
  90. package/css/pico.layered.min.css +0 -107
  91. package/css/postcss.config.js +0 -23
  92. package/index.html +0 -63
  93. package/src/blades.standalone.css +0 -2
  94. package/src/standalone/_core.css +0 -32
  95. package/src/standalone/_utilities.css +0 -55
  96. package/src/standalone/forms/_float-label.css +0 -2
  97. /package/src/{standalone/content → blades}/_code.css +0 -0
  98. /package/src/{standalone/layout → blades}/_columns.css +0 -0
  99. /package/src/{standalone/components/_icon-helper.css → blades/_icon.css} +0 -0
  100. /package/src/{standalone/components → blades}/_timeline.css +0 -0
  101. /package/src/{standalone → blades}/_variables.css +0 -0
  102. /package/src/{standalone/forms/_float-label.core.css → blades/float-label/_core.css} +0 -0
  103. /package/src/{standalone/layout/_breakout.css → ninja/_container-breakout.css} +0 -0
  104. /package/src/{standalone/content/_typography.css → ninja/_heading-anchor.css} +0 -0
  105. /package/src/{standalone/content/_list.css → ninja/_list-helpers.css} +0 -0
  106. /package/src/{standalone/layout/_scroller.css → ninja/_page-anchors.css} +0 -0
  107. /package/src/{standalone/content/_table.css → ninja/_table-helpers.css} +0 -0
  108. /package/src/{standalone/content → ninja}/_table-responsive.css +0 -0
@@ -1,860 +0,0 @@
1
- /*!
2
- * Blades CSS standalone kit v3 🥷
3
- * Copyright 2026 (https://blades.ninja/css/standalone/)
4
- * Licensed under MIT
5
- */
6
- /*\3c !--section:code-->```css */
7
-
8
- /* Follows https://github.com/picocss/pico/blob/main/scss/_index.scss */
9
-
10
- :scope,
11
- :host {
12
- /**
13
- * Design Tokens !!! NAMING NOT FINALIZED YET !!!
14
- * `--in-pico: *` props below are for reference only (not to be used)
15
- */
16
- --blades-token-primary: var(--pico-primary, dodgerblue);
17
- --in-pico: #01aaff;
18
- --blades-token-secondary: var(--pico-secondary, lightslategray);
19
- --in-pico: #969eaf;
20
-
21
- /**
22
- * Inherited Variables
23
- */
24
- --blades-timeline-border-color: color-mix(
25
- in srgb,
26
- var(--blades-token-secondary) 50%,
27
- transparent
28
- );
29
- }
30
-
31
- /* Layout */
32
-
33
- /*
34
- \3c !--section:code-->
35
- ```css */
36
- .breakout,
37
- .breakout-all {
38
- max-width: calc(10% + 65ch + 10%);
39
- /* Prepare the container for breakout elements */
40
- padding-inline: 10%;
41
- }
42
- @media (width < 768px) {
43
- .breakout,
44
- .breakout-all {
45
- max-width: calc(1rem + 65ch + 1rem);
46
- padding-inline: 1rem
47
- }
48
- }
49
- /* Breakout direct children only */
50
- .breakout > *:is(
51
- table,
52
- pre,
53
- figure, video, iframe, canvas,
54
- img, picture,
55
-
56
- .breakout-item,
57
- .breakout-item-max
58
- ),
59
- .breakout-all > *:is(
60
- table,
61
- pre,
62
- figure, video, iframe, canvas,
63
- img, picture,
64
-
65
- .breakout-item,
66
- .breakout-item-max
67
- ) {
68
- width: -moz-fit-content;
69
- width: fit-content;
70
- min-width: 100%;
71
- max-width: min(125%, 100dvw);
72
- margin-left: 50%;
73
- transform: translateX(-50%);
74
- }
75
- /* Respect img/picture min-width */
76
- .breakout > *:is(img, picture):not(.does-not-exist), .breakout-all > *:is(img, picture):not(.does-not-exist) /* soft win specificity over .breakout-item above */ {
77
- min-width: auto;
78
- }
79
- /* Max out the width of the element */
80
- .breakout > *.breakout-item-max, .breakout-all > *.breakout-item-max {
81
- width: min(125%, 100dvw) !important;
82
- /* !important is for cases like figure.breakout-item-max @TODO */
83
- }
84
-
85
- .breakout-all > *:is(h2, h3, h4, h5, h6, hr):not([class]) {
86
- position: relative;
87
- }
88
-
89
- .breakout-all > *:is(h2, h3, h4, h5, h6, hr):not([class])::before {
90
- display: block;
91
- position: absolute;
92
- background: gray;
93
- content: "";
94
- opacity: 12.5%;
95
- }
96
-
97
- .breakout-all > *:is(h2, h3, h4, h5, h6):not([class])::before {
98
- top: 50%;
99
- right: 100%;
100
- width: 10em;
101
- height: 0.25em;
102
- margin-right: 0.8ch;
103
- transform: translateY(-50%);
104
- background: linear-gradient(to left, gray, transparent);
105
- }
106
-
107
- /* @TODO: add to tricks-wiki why `*` works here, but `&` fails */
108
-
109
- .breakout-all > *:is(h2, h3, h4, h5, h6):not([class]):where(hr:not([class]) + *)::before {
110
- display: none !important;
111
- }
112
-
113
- .breakout-all > *:is(hr):not([class]) {
114
- height: 0.5rem;
115
- overflow: visible;
116
- border: none;
117
- }
118
-
119
- .breakout-all > *:is(hr):not([class])::before {
120
- left: 50%;
121
- width: 100dvw;
122
- height: 100%;
123
- transform: translateX(-50%);
124
- }
125
- /*```
126
- \3c !--section:docs-->
127
-
128
- The `.breakout` layout allows images, tables, and other figures to automatically extend or bleed beyond their parent container’s width.
129
-
130
- Break out a wide image from the text flow:
131
-
132
- <div>\3c !-- Dummy div to avoid p tag in Markdown --></div><img
133
- src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='3000' height='300'><rect width='100%' height='100%' fill='gray'/></svg>">
134
-
135
- Or table:
136
-
137
- | Imagine<hr> | a<hr> | really<hr> | wide<hr> | table<hr> | here<hr> |
138
- | ----------- | ----- | ---------- | -------- | --------- | -------- |
139
- | ... |
140
-
141
- Or code block:
142
-
143
- ```html
144
- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, quod. Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, quod.</p>
145
- ```
146
-
147
- Or anything else:
148
-
149
- <article class="breakout-item-max" data-theme="dark">
150
-
151
- Using `.breakout-item` and `.breakout-item-max` helpers {style=margin:0}
152
- </article>
153
-
154
- <div><hr></div>
155
-
156
- `.breakout-all` also visually breaks out headings and horizontal rules:
157
-
158
- <h2>Heading 2</h2><h3>Heading 3</h3><h4>Heading 4</h4><h5>Heading 5</h5><h6>Heading 6</h6>
159
- <hr>
160
-
161
- \3c !--section--> */
162
- /*\3c !--section:docs-->
163
-
164
- `.columns` automatically creates columns with at least 30 characters each:
165
-
166
- <article class="columns">
167
- <p>1</p><p>2</p><p>3</p><p>4</p><p>5</p><p>6</p>
168
- </article>
169
-
170
- The smaller the font size, the more columns will be created:
171
-
172
- <article class="columns" style="font-size: 65%">
173
- <p>1</p><p>2</p><p>3</p><p>4</p><p>5</p><p>6</p><p>7</p><p>8</p><p>9</p>
174
- </article>
175
-
176
- Useful for tables of contents and long lists.
177
-
178
- \3c !--section:code-->
179
- ```css */
180
- .columns {
181
- -moz-columns: 25ch auto;
182
- columns: 25ch auto; /* common container 65ch / 25ch => 2 columns max, with a buffer for list paddings */
183
- }
184
- /* Avoid breaking inside elements, such as nested lists */
185
- .columns > * {
186
- -moz-column-break-inside: avoid;
187
- break-inside: avoid;
188
- }
189
- /*```\3c !--section:docs-->
190
-
191
- `<a href="#top">` is automatically fixed to the bottom-right corner with extra top padding for easier clicking:
192
- ```css */
193
- [href="#top"] {
194
- position: fixed;
195
- right: 0;
196
- bottom: 0;
197
- padding-top: 50vh;
198
- }
199
- /* Content */
200
- /*\3c !--section:docs-->
201
-
202
- ## Heading anchors
203
-
204
- Links with `href="#..."` inside headings are automatically displayed as anchors:
205
-
206
- <article>
207
- <h2 style="margin: 0 0 0 1.5rem">Heading with anchor <a aria-hidden="true" style="visibility: visible">#</a></h2>
208
- </article>
209
-
210
- How it works:
211
- ```css */
212
- h1,
213
- h2,
214
- h3,
215
- h4,
216
- h5,
217
- h6 {
218
- position: relative;
219
- }
220
- h1 a[aria-hidden="true"], h2 a[aria-hidden="true"], h3 a[aria-hidden="true"], h4 a[aria-hidden="true"], h5 a[aria-hidden="true"], h6 a[aria-hidden="true"] {
221
- visibility: hidden;
222
- position: absolute;
223
- top: 50%;
224
- right: 100%;
225
- padding-right: 0.2ch;
226
- transform: translateY(-50%);
227
- color: silver;
228
- text-decoration: none;
229
- }
230
- @media /* to avoid double-tap on touch devices */ (hover: hover) {
231
- h1:hover a[aria-hidden="true"], h2:hover a[aria-hidden="true"], h3:hover a[aria-hidden="true"], h4:hover a[aria-hidden="true"], h5:hover a[aria-hidden="true"], h6:hover a[aria-hidden="true"] {
232
- visibility: visible;
233
- }
234
- }
235
- /*\3c !--section:docs-->
236
-
237
- ## Custom markers
238
-
239
- Customize markers using inline `style="--list-marker:..."` on `<ul>/<ol>` or even individual `<li>`:
240
-
241
- <article>
242
-
243
- - you
244
- - can
245
- - make
246
- - really
247
- - cool markers {style="--list-marker:'🧊 '"}
248
- - with
249
- - *Bl*ades {style="--list-marker:'🥷 '"}
250
-
251
- {style="--list-marker:'→ '"}
252
- </article>
253
-
254
- How it works:
255
- ```css */
256
- ul[style*="--list-marker:"], ol[style*="--list-marker:"] {
257
- list-style-type: var(--list-marker);
258
- }
259
- ul[style*="--list-marker:"] > li, ol[style*="--list-marker:"] > li {
260
- list-style-type: inherit;
261
- }
262
- ul li[style*="--list-marker:"], ol li[style*="--list-marker:"] {
263
- list-style-type: var(--list-marker);
264
- }
265
- ul li[data-marker]::marker, ol li[data-marker]::marker {
266
- content: attr(data-marker) " "; /* ⚠️ Chrome and Firefox only */
267
- }
268
- /*```
269
-
270
- ## Markerless
271
-
272
- `.markerless` removes markers and reduces padding:
273
-
274
- <article>
275
-
276
- - 1️⃣ so you can use
277
- - 2️⃣ emojis or images
278
- - 3️⃣ instead of bullets
279
-
280
- {.markerless}
281
- </article>
282
-
283
- How it works:
284
- ```css */
285
- ul.markerless, ol.markerless {
286
- padding-inline-start: 1.25rem;
287
- }
288
- ul.markerless li, ol.markerless li {
289
- list-style: none;
290
- }
291
- /*```
292
-
293
- ## Unlist
294
-
295
- `.unlist` removes list styling at all:
296
-
297
- <article>
298
-
299
- - One: <article>1</article>
300
- - Two: <article>2</article>
301
- - Three: <article>3</article>
302
-
303
- {.unlist .grid style=margin:0}
304
- </article>
305
-
306
- `.unlist-all` removes styling from all nested lists too.
307
-
308
- How it works:
309
- ```css */
310
- ul.unlist,
311
- ul.unlist-all,
312
- .unlist-all ul,
313
- ol.unlist,
314
- ol.unlist-all,
315
- .unlist-all ol {
316
- padding-inline-start: 0;
317
- }
318
- ul.unlist > li, ul.unlist-all > li, .unlist-all ul > li, ol.unlist > li, ol.unlist-all > li, .unlist-all ol > li {
319
- list-style: none;
320
- }
321
- /*\3c !--section:docs-->
322
-
323
- ## Column expanders
324
-
325
- Place `<hr>` element inside `<th>` column to expand it horizontally:
326
-
327
- <article>
328
-
329
- | Column with `<hr>`<hr> | Same column without `<hr>` | ... {style=width:100%} |
330
- | --- | --- | --- |
331
- | (012) 345-6789 | (012) 345-6789 |
332
- </article>
333
-
334
- Living examples of big tables with `<hr>`-expanders: \3c !--A-Z-->
335
- - https://blades.ninja/ai/ide/
336
- - https://blades.ninja/build-awesome-11ty/starters/
337
- - https://blades.ninja/css/frameworks/
338
- - https://blades.ninja/ssg/
339
-
340
- How it works:
341
- ```css */
342
- th hr {
343
- visibility: hidden;
344
- width: 12ch; /* min ~65/12 = ~5 cols */
345
- height: 0;
346
- margin: 0;
347
- }
348
- th hr.lg {
349
- width: 18ch;
350
- }
351
- th hr.x2 {
352
- width: 24ch;
353
- }
354
- /*```
355
-
356
- ## Borderless table
357
-
358
- `.borderless` removes all default borders:
359
-
360
- <article>
361
-
362
- | Less | borders |
363
- | ---- | ------- |
364
- | More | fun |
365
-
366
- {.borderless}
367
- </article>
368
-
369
- \3c !--section-->*/
370
- table.borderless th,
371
- table.borderless td {
372
- border: none;
373
- }
374
- /*
375
- \3c !--section:code-->
376
- ```css */
377
- table.responsive,
378
- .breakout > table:not(.does-not-exist),
379
- .breakout-all > table:not(.does-not-exist) {
380
-
381
- /* Let them scroll */
382
- display: block;
383
-
384
- /* Let them full-bleed */
385
- width: -moz-max-content;
386
- width: max-content;
387
- min-width: auto;
388
- max-width: 100dvw;
389
- /* Center horizontally */
390
- margin-left: 50%;
391
- padding-inline: 7.5%;
392
- overflow-x: auto;
393
- transform: translateX(-50%);
394
- -webkit-overflow-scrolling: touch; /* Smooth scroll for iOS */
395
- }
396
- table.responsive th,
397
- table.responsive td,
398
- .breakout > table:not(.does-not-exist) th,
399
- .breakout > table:not(.does-not-exist) td,
400
- .breakout-all > table:not(.does-not-exist) th,
401
- .breakout-all > table:not(.does-not-exist) td {
402
- padding-inline-start: 0;
403
- }
404
- /*```
405
- `table:not(.does-not-exist)` trick (inspired by postcss) is used here to increase specificity against selectors like `&:is(table, .table)`
406
-
407
- \3c !--section:summary-->
408
-
409
- `.responsive` makes a table full-bleed and scroll on mobile, without a need for a redundant wrapper (finally).
410
- Tables inside https://blades.ninja/css/breakout/ are responsive by default.
411
-
412
- \3c !--section:docs-->
413
-
414
- ### Demo table
415
-
416
- | Term | Description <hr class="x2"> | Link |
417
- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
418
- | Responsive design | Approach to web design that aims to make web pages render well on a variety of devices and window or screen sizes from minimum to maximum display size to ensure usability and satisfaction. | https://en.wikipedia.org/wiki/Responsive_web_design |
419
-
420
- {.responsive}
421
-
422
- ---
423
-
424
- Living examples: \3c !--A-Z-->
425
- - https://blades.ninja/ai/ide/
426
- - https://blades.ninja/build-awesome-11ty/starters/
427
- - https://blades.ninja/css/frameworks/
428
- - https://blades.ninja/ssg/
429
-
430
- \3c !--section--> */
431
- /*\3c !--section:docs-->
432
-
433
- The `<pre><code>` blocks are Prism-compatible and support captions via `data-caption="..."` attribute:
434
-
435
- ```treeview {data-caption="Blades CSS ships:"}
436
- /css/
437
- ├── blades.css (Pico CSS successor)
438
- ├── blades.standalone.css (framework-agnostic)
439
- ├── ninja.css (experimental add-ons)
440
- └── pico.css (underlying fork)
441
- ```
442
-
443
- \3c !--section:code-->
444
- ```css */
445
- @media (width < 768px) {
446
- pre {
447
- border-radius: 0
448
- }
449
- }
450
-
451
- /* Code block caption via data-attr (to display filename, etc.) */
452
-
453
- code[data-caption]::before {
454
- display: block;
455
- margin-bottom: 1rem;
456
- content: attr(data-caption);
457
- font-style: italic;
458
- opacity: 50%;
459
- }
460
-
461
- /* Forms */
462
-
463
- /*!
464
- * Float Label CSS v2 by Blades CSS 🥷🏷️
465
- * Copyright 2016–2026 (https://blades.ninja/css/float-label/)
466
- * Licensed under MIT
467
- */
468
- /*\3c !--section:docs-->
469
-
470
- First, we target either:
471
- 1. `<label>` which `:has` inner form inputs (classless approach)
472
- 2. or explicit `.has-float-label` class (explicit approach)
473
-
474
- ```css */
475
- label:has(> span):has(
476
- input:not([type="checkbox"], [type="radio"], [type="range"]),
477
- textarea,
478
- select
479
- ),
480
- .has-float-label {
481
- display: block;
482
- position: relative;
483
- /*```
484
- Finally, we detect if placeholder is shown, but not in focus. That means we can safely hide it, and enlarge the float label instead:
485
- ```css */
486
- }
487
- /*```
488
- Then, we define the default/fallback state (when the float label should be minimized):
489
- ```css */
490
- label:has(> span):has(
491
- input:not([type="checkbox"], [type="radio"], [type="range"]),
492
- textarea,
493
- select
494
- ) > span,
495
- label:has(> span):has(
496
- input:not([type="checkbox"], [type="radio"], [type="range"]),
497
- textarea,
498
- select
499
- ) label,
500
- .has-float-label > span,
501
- .has-float-label label {
502
- position: absolute;
503
- top: 0;
504
- left: 0;
505
- font-size: 75%;
506
- cursor: text;
507
- }
508
- label:has(> span):has(
509
- input:not([type="checkbox"], [type="radio"], [type="range"]),
510
- textarea,
511
- select
512
- ) *:placeholder-shown:not(:focus)::-moz-placeholder, .has-float-label *:placeholder-shown:not(:focus)::-moz-placeholder {
513
- opacity: 0;
514
- }
515
- label:has(> span):has(
516
- input:not([type="checkbox"], [type="radio"], [type="range"]),
517
- textarea,
518
- select
519
- ) *:-moz-placeholder:not(:focus)::placeholder, .has-float-label *:-moz-placeholder:not(:focus)::placeholder {
520
- opacity: 0;
521
- }
522
- label:has(> span):has(
523
- input:not([type="checkbox"], [type="radio"], [type="range"]),
524
- textarea,
525
- select
526
- ) *:placeholder-shown:not(:focus)::placeholder, .has-float-label *:placeholder-shown:not(:focus)::placeholder {
527
- opacity: 0;
528
- }
529
- label:has(> span):has(
530
- input:not([type="checkbox"], [type="radio"], [type="range"]),
531
- textarea,
532
- select
533
- ):has(*:-moz-placeholder:not(:focus)) > span, label:has(> span):has(
534
- input:not([type="checkbox"], [type="radio"], [type="range"]),
535
- textarea,
536
- select
537
- ):has(*:-moz-placeholder:not(:focus)) label, .has-float-label:has(*:-moz-placeholder:not(:focus)) > span, .has-float-label:has(*:-moz-placeholder:not(:focus)) label {
538
- font-size: inherit;
539
- opacity: 50%;
540
- }
541
- label:has(> span):has(
542
- input:not([type="checkbox"], [type="radio"], [type="range"]),
543
- textarea,
544
- select
545
- ):has(*:placeholder-shown:not(:focus)) > span,
546
- label:has(> span):has(
547
- input:not([type="checkbox"], [type="radio"], [type="range"]),
548
- textarea,
549
- select
550
- ):has(*:placeholder-shown:not(:focus)) label,
551
- .has-float-label:has(*:placeholder-shown:not(:focus)) > span,
552
- .has-float-label:has(*:placeholder-shown:not(:focus)) label {
553
- font-size: inherit;
554
- opacity: 50%;
555
- }
556
- /*```
557
-
558
- 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.
559
-
560
- 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.
561
-
562
- */
563
- /* Components */
564
- /* Extends https://github.com/picocss/pico/blob/main/scss/content/_link.scss
565
- \3c !--section:code-->
566
- ```css */
567
- /* Use inline flex only if link contains an icon */
568
- a:not(.does-not-exist):has(> i) {
569
- display: inline-flex;
570
- overflow-y: clip; /* to work in pair with text-underline-offset in Safari */
571
- gap: 0.375ch; /* =3/8 */
572
- text-wrap: balance;
573
- }
574
- a:not(.does-not-exist) > i {
575
- float: left; /* ✅ Chrome ❌ Safari */
576
- font-style: normal;
577
- text-underline-offset: -2em; /* ❌ Chrome ✅ Safari - to clip it with overflow-y */
578
- }
579
- /* Favicons */
580
- a:not(.does-not-exist) > i > img {
581
- display: inline-block; /* for Tailwind CSS Typography */
582
- max-width: none; /* to keep ratio safe */
583
- height: 1.25em;
584
- margin-block-start: calc(-0.25em / 2);
585
- }
586
- a:not(.does-not-exist) > i[class^="fa-"],
587
- a:not(.does-not-exist) > i[class*=" fa-"] {
588
- line-height: inherit;
589
- --fa-width: auto;
590
- }
591
- /* Font Awesome */
592
- a:not(.does-not-exist) > i.fa-lg {
593
- line-height: normal;
594
- }
595
- /*```
596
- \3c !--section:summary-->
597
-
598
- Use *Bl*ades `<i>`-helper to wrap emojis, favicons, or simply drop Font Awesome icons inside links.
599
- It automatically handles sizing and alignment while preventing underline on icons.
600
-
601
- \3c !--section:docs-->
602
-
603
- <article class="breakout-item">
604
-
605
- | Use `<i>`-helper with | Clean HTML without `<span>ning` |
606
- | ------------------------------------------------------------------------------------- | ------------------------------------ |
607
- | [<i>🥷</i> Emojis](#) | `<a><i>🥷</i> Text</a>` |
608
- | [<i>![](https://www.google.com/s2/favicons?domain=any.digital&sz=64)</i> Favicons](#) | `<a><i><img src="..."></i> Text</a>` |
609
- | [<i class="fa-brands fa-github fa-lg"></i> Font Awesome icons](#) | `<a><i class="fa-..."></i> Text</a>` |
610
- </article>
611
-
612
- Or even for:
613
-
614
- <article>
615
- <a href="#" style="margin: 0 0 0 1rem"><i>🥷</i> very-very-very-very-very-<br>long-multiline-links</a>
616
- </article>
617
-
618
- How we made it: https://codepen.io/editor/anydigital/pen/019d2b94-5616-75dc-a23e-e111869d5237
619
-
620
- \3c !--section--> */
621
- /*\3c !--section:docs-->
622
-
623
- Use `dl.timeline` or wrap a `<dl>` with `.has-timeline` to style it as a
624
- vertical timeline — each `<dd>` gets a left border strip acting as the track:
625
-
626
- <article class="has-timeline">
627
-
628
- May 11, 2026
629
- : First Blades CSS stable release (v2.2.0).
630
-
631
- Mar 15, 2025
632
- : Last Pico CSS update (v2.1.1).
633
-
634
- </article>
635
-
636
- \3c !--section:code-->```css */
637
- dl.timeline dd, .has-timeline > dl dd {
638
- margin-block: 0;
639
- padding: 0.25rem 0 0.75rem 1rem;
640
- border-inline-start: 0.25rem solid var(--blades-timeline-border-color);
641
- }
642
- /* Utilities */
643
- /*\3c !--section:docs-->
644
-
645
- ## Dark auto
646
-
647
- `.dark-auto` automatically creates a simple dark version of any element:
648
-
649
- <article data-theme="dark">
650
- <p>Look how cool <big class="dark-auto">🔥🕷️🐦‍⬛🐄🦓</big> can look in the dark!</p>
651
- </article>
652
-
653
- How it works:
654
- ```css */
655
- /* Per https://picocss.com/docs/css-variables#css-variables-for-color-schemes */
656
- :root {
657
- --blades-dark-filter: invert(100%) hue-rotate(180deg);
658
- }
659
- .dark-auto {
660
- /* Dark color scheme (Forced) */
661
- }
662
- /* Dark color scheme (Auto) */
663
- @media (prefers-color-scheme: dark) {
664
- .dark-auto {
665
- filter: var(--blades-dark-filter)
666
- }
667
- }
668
- .dark-auto[data-theme="dark"],
669
- .dark-auto:where([data-theme="dark"] *) {
670
- filter: var(--blades-dark-filter);
671
- }
672
- /*```
673
-
674
- ## Faded
675
-
676
- `.faded` reduces the opacity of an element:
677
-
678
- <article class="faded">
679
- Hover to unfade me!
680
- </article>
681
-
682
- How it works:
683
- ```css */
684
- .faded {
685
- opacity: 50%;
686
- }
687
- .faded:hover {
688
- opacity: 87.5%;
689
- }
690
- /*```
691
- \3c !--section--> */
692
-
693
- /* Fix the scrollbar color when inverted by https://tailwindcss.com/docs/filter-invert */
694
- .invert ::-webkit-scrollbar {
695
- filter: invert(1) !important;
696
- }
697
- /*\3c !--section:code-->```css */
698
- /* Default/fallback state */
699
- label:has(> span):has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select) > span,
700
- label:has(> span):has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select) label,
701
- .has-float-label > span,
702
- .has-float-label label {
703
- padding-inline-start: calc(1rem + 1px); /* match Pico's padding + border */
704
- padding-block-start: 0.25rem;
705
- opacity: 75%;
706
- transition: all 0.25s;
707
- }
708
- label:has(> span):has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select) input,
709
- label:has(> span):has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select) textarea,
710
- label:has(> span):has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select) select,
711
- .has-float-label input,
712
- .has-float-label textarea,
713
- .has-float-label select {
714
- margin-block-start: 0; /* reset Pico */
715
- padding-inline-start: 1rem; /* match Pico */
716
- padding-block: 1.125rem 0.375rem; /* match Pico's total: 2 x 0.75rem = 1.5rem */
717
- }
718
- 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 {
719
- opacity: 100%;
720
- -moz-transition: all 0.25s;
721
- transition: all 0.25s;
722
- }
723
- 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 {
724
- opacity: 100%;
725
- transition: all 0.25s;
726
- }
727
- /* Enlarged state */
728
- label:has(> span):has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select):has(*:-moz-placeholder:not(:focus)) > span, label:has(> span):has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select):has(*:-moz-placeholder:not(:focus)) label, .has-float-label:has(*:-moz-placeholder:not(:focus)) > span, .has-float-label:has(*:-moz-placeholder:not(:focus)) label {
729
- padding-block: 0.75rem; /* match Pico */
730
- }
731
- label:has(> span):has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select):has(*:placeholder-shown:not(:focus)) > span,
732
- label:has(> span):has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select):has(*:placeholder-shown:not(:focus)) label,
733
- .has-float-label:has(*:placeholder-shown:not(:focus)) > span,
734
- .has-float-label:has(*:placeholder-shown:not(:focus)) label {
735
- padding-block: 0.75rem; /* match Pico */
736
- }
737
- html {
738
- /* Prevent horizontal overflow and scrolling, modern way. */
739
- overflow-x: clip;
740
-
741
- /* Enable font smoothing */
742
- -webkit-font-smoothing: antialiased;
743
- -moz-osx-font-smoothing: grayscale;
744
- }
745
-
746
- body {
747
-
748
- /* Make the `body` a flex container with column layout, and `main` to automatically fill available space. This is useful for creating sticky footers and full-height layouts. */
749
- display: flex;
750
- flex-direction: column;
751
- /* Ensure `body` takes at least the full height of the viewport (using dynamic viewport height for better mobile support). */
752
- min-height: 100dvh;
753
-
754
- /* Evaluates the last ~4 lines of text blocks to prevent a single word from sitting on the final line. */
755
-
756
- /* Enable global hyphenation */
757
- /* ... except for links and tables which are better (safer) without hyphenation */
758
- }
759
-
760
- body > main {
761
- flex-grow: 1;
762
- }
763
-
764
- body {
765
- hyphens: auto;
766
- text-wrap: pretty;
767
- }
768
-
769
- body a,
770
- body table {
771
- hyphens: none;
772
- }
773
-
774
- a:not([href^="#"]) {
775
- text-decoration-thickness: 1px;
776
- }
777
-
778
- a:not([href^="#"]):hover {
779
- text-decoration-thickness: 2px;
780
- }
781
-
782
- h1,
783
- h2,
784
- h3,
785
- h4,
786
- h5,
787
- h6 {
788
- text-wrap: balance;
789
- }
790
- h1 {
791
- margin-bottom: 1rem; /* for tw-typography */
792
- font-size: 2.5em; /* for pico.css & tw-typography */
793
- }
794
-
795
- hr {
796
- margin-block: 2em; /* for pico.css & tw-typography */
797
- }
798
-
799
- ul ul {
800
- font-size: 87.5%;
801
- }
802
-
803
- dl dt {
804
- margin-block: 0.25rem;
805
- font-weight: 500;
806
- }
807
-
808
- dl dd {
809
- margin-block-end: 1rem;
810
- }
811
-
812
- pre small {
813
- font-weight: lighter;
814
- opacity: 75%;
815
- }
816
-
817
- pre:has(code) {
818
- background: #181c25 !important;
819
- }
820
-
821
- table th {
822
- font-weight: bold;
823
- vertical-align: bottom;
824
- }
825
-
826
- table td {
827
- vertical-align: top;
828
- }
829
-
830
- table pre {
831
- margin-bottom: 0.25rem;
832
- }
833
-
834
- [href="#top"] {
835
- opacity: 25%;
836
- }
837
-
838
- [href="#top"]:hover {
839
- opacity: 75%;
840
- }
841
-
842
- [href="#top"] > i {
843
- display: inline-block;
844
- margin: 0.5rem;
845
- padding: 0.25rem 0.375rem;
846
- border-color: black;
847
- color: black;
848
- font-size: 0.75rem;
849
- }
850
-
851
- .breakout > img,
852
- .breakout > figure,
853
- .breakout-all > img,
854
- .breakout-all > figure {
855
- margin-bottom: 1rem;
856
- }
857
-
858
- .faded a {
859
- text-decoration-style: dotted;
860
- }