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

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 (47) hide show
  1. package/README.md +21 -18
  2. package/css/blades.css +148 -1
  3. package/css/blades.min.css +4 -174
  4. package/css/blades.ninja.css +148 -1
  5. package/css/blades.ninja.min.css +4 -182
  6. package/css/float-label.min.css +2 -51
  7. package/css/layered/blades.layered.css +148 -1
  8. package/css/layered/blades.layered.min.css +4 -174
  9. package/css/layered/components/dropdown-popover.css +107 -0
  10. package/css/layered/components/loading.css +19 -1
  11. package/css/layered/components/modal-modern.css +28 -0
  12. package/css/layered/components/timeline.css +24 -0
  13. package/css/layered/components.css +18 -1
  14. package/css/layered/content/code-block.css +32 -0
  15. package/css/layered/content/icon.css +60 -0
  16. package/css/layered/forms/float-label/core.css +103 -0
  17. package/css/layered/forms/float-label/theme.css +110 -0
  18. package/css/layered/forms/float-label.css +210 -0
  19. package/css/layered/layout/columns.css +30 -0
  20. package/css/layered/variables-blades.css +23 -0
  21. package/css/pico.conditional.css +18 -1
  22. package/css/pico.conditional.min.css +2 -111
  23. package/css/pico.css +18 -1
  24. package/css/pico.min.css +2 -111
  25. package/package.json +7 -7
  26. package/src/blades/_index.css +11 -6
  27. package/src/blades/components/_dropdown-popover.css +107 -0
  28. package/src/blades/components/_modal-modern.css +26 -0
  29. package/src/blades.css +0 -1
  30. package/src/float-label.css +1 -1
  31. package/src/ninja/LICENSE +22 -0
  32. package/src/ninja/README.md +1 -0
  33. package/src/ninja/_index.css +1 -1
  34. package/src/pico/components/_loading.css +27 -1
  35. package/_includes/blades/links.liquid +0 -21
  36. package/_includes/blades/links.njk +0 -9
  37. package/_includes/blades/links.twig +0 -18
  38. /package/src/{_compact.css → blades/_compact.css} +0 -0
  39. /package/src/blades/{_variables.css → _variables-blades.css} +0 -0
  40. /package/src/blades/{_timeline.css → components/_timeline.css} +0 -0
  41. /package/src/blades/{_code.css → content/_code-block.css} +0 -0
  42. /package/src/blades/{_icon.css → content/_icon.css} +0 -0
  43. /package/src/blades/{float-label → forms/float-label}/_core.css +0 -0
  44. /package/src/blades/{float-label → forms/float-label}/_index.css +0 -0
  45. /package/src/blades/{float-label → forms/float-label}/_theme.css +0 -0
  46. /package/src/blades/{_columns.css → layout/_columns.css} +0 -0
  47. /package/src/ninja/{_page-anchors.css → _scroll-to.css} +0 -0
@@ -0,0 +1,107 @@
1
+ @layer blades {
2
+ /*\3c !--section:docs-->
3
+
4
+ A `<ul>` or `<menu>` with the `popover` attribute is styled like a dropdown and opens next to the button
5
+ that toggles it, with no JS:
6
+
7
+ ```html
8
+ <button popovertarget="actions">Actions</button>
9
+ <ul id="actions" popover>
10
+ <li><a href="#">Edit</a></li>
11
+ <li><a href="#">Duplicate</a></li>
12
+ </ul>
13
+ ```
14
+
15
+ - Clicking outside or pressing Esc closes it, and it's drawn on top of everything (no `z-index`, no clipping by `overflow`).
16
+ - It opens below the button (on the reading side, also in RTL) and flips when there's no room.
17
+ Open it with `popovertarget`, `commandfor` or `showPopover({ source })`, so it knows its button.
18
+ - Browsers without CSS anchor positioning show it in the middle of the screen instead, like a plain popover.
19
+ - It uses the dropdown colours (`--pico-dropdown-*`, from `components/dropdown`).
20
+
21
+ \3c !--section:code-->```css */
22
+ :is(ul, menu)[popover] {
23
+ min-width: -moz-fit-content;
24
+ min-width: fit-content;
25
+ margin: auto;
26
+ padding: 0;
27
+ border: var(--pico-border-width) solid var(--pico-dropdown-border-color);
28
+ border-radius: var(--pico-border-radius);
29
+ background-color: var(--pico-dropdown-background-color);
30
+ box-shadow: var(--pico-dropdown-box-shadow);
31
+ color: var(--pico-dropdown-color);
32
+ white-space: nowrap;
33
+ opacity: 0;
34
+ transition:
35
+ opacity var(--pico-transition),
36
+ overlay var(--pico-transition) allow-discrete,
37
+ display var(--pico-transition) allow-discrete;
38
+ }
39
+ /* Beats `nav ul` / `aside ul`, which would otherwise show the closed menu */
40
+ :is(ul, menu)[popover]:not(:popover-open) {
41
+ display: none;
42
+ }
43
+ :is(ul, menu)[popover]:popover-open {
44
+ display: block;
45
+ opacity: 1;
46
+ }
47
+ :is(ul, menu)[popover] li {
48
+ display: block;
49
+ margin-bottom: 0;
50
+ padding: calc(var(--pico-form-element-spacing-vertical) * 0.5)
51
+ var(--pico-form-element-spacing-horizontal);
52
+ list-style: none;
53
+ }
54
+ :is(ul, menu)[popover] li:first-of-type {
55
+ margin-top: calc(var(--pico-form-element-spacing-vertical) * 0.5);
56
+ }
57
+ :is(ul, menu)[popover] li:last-of-type {
58
+ margin-bottom: calc(var(--pico-form-element-spacing-vertical) * 0.5);
59
+ }
60
+ :is(ul, menu)[popover] li:has(label):hover {
61
+ background-color: var(--pico-dropdown-hover-background-color);
62
+ }
63
+ :is(ul, menu)[popover] li a {
64
+ display: block;
65
+ margin: calc(var(--pico-form-element-spacing-vertical) * -0.5)
66
+ calc(var(--pico-form-element-spacing-horizontal) * -1);
67
+ padding: calc(var(--pico-form-element-spacing-vertical) * 0.5)
68
+ var(--pico-form-element-spacing-horizontal);
69
+ overflow: hidden;
70
+ border-radius: 0;
71
+ color: var(--pico-dropdown-color);
72
+ text-decoration: none;
73
+ text-overflow: ellipsis;
74
+ }
75
+ :is(ul, menu)[popover] li a:is(:hover, :focus, :active, :focus-visible, [aria-current]:not([aria-current="false"])) {
76
+ background-color: var(--pico-dropdown-hover-background-color);
77
+ }
78
+ :is(ul, menu)[popover] li label {
79
+ width: 100%;
80
+ }
81
+ /* Beats Pico's `nav ul:first-of-type` / `:last-of-type` margins whatever the load order (soft win via :not) */
82
+ nav :is(ul, menu)[popover]:not(.does-not-exist) {
83
+ margin: auto;
84
+ }
85
+ @starting-style {
86
+ :is(ul, menu)[popover]:popover-open {
87
+ opacity: 0;
88
+ }
89
+ }
90
+
91
+ /* Next to the button that opened it (its implicit anchor) */
92
+ @supports (position-area: bottom) {
93
+ :is(ul, menu)[popover],
94
+ nav :is(ul, menu)[popover]:not(.does-not-exist) {
95
+ position-area: bottom span-right;
96
+ position-try-fallbacks: flip-block, flip-inline;
97
+ margin: 0;
98
+ margin-top: var(--pico-outline-width);
99
+ inset: auto;
100
+ }
101
+
102
+ :is(ul, menu)[popover]:dir(rtl), nav :is(ul, menu)[popover]:not(.does-not-exist):dir(rtl) {
103
+ position-area: bottom span-left;
104
+ }
105
+ }
106
+
107
+ }
@@ -11,7 +11,11 @@
11
11
  --pico-loading-spinner-opacity: 0.5;
12
12
  }
13
13
 
14
- [aria-busy="true"]:not(input, select, textarea, html, form) {
14
+ [aria-busy="true"]:not(input, select, textarea, html, form):not(
15
+ :where(button, [type="submit"], [type="button"], [type="reset"], [role="button"])
16
+ ) {
17
+ /* :where() zeroes the specificity of the button list inside :not(), so this rule stays
18
+ * low-specificity and doesn't override the more specific button rules below */
15
19
  white-space: nowrap;
16
20
  }
17
21
  [aria-busy="true"]:not(input, select, textarea, html, form)::before {
@@ -40,4 +44,18 @@ a[aria-busy="true"] {
40
44
  pointer-events: none;
41
45
  }
42
46
 
47
+ /* Buttons keep their size: the label stays in place but hidden, the spinner sits on top */
48
+ button[aria-busy="true"]:not(:empty), [type="submit"][aria-busy="true"]:not(:empty), [type="button"][aria-busy="true"]:not(:empty), [type="reset"][aria-busy="true"]:not(:empty), [role="button"][aria-busy="true"]:not(:empty) {
49
+ position: relative;
50
+ color: transparent;
51
+ }
52
+ button[aria-busy="true"]:not(:empty) > *, [type="submit"][aria-busy="true"]:not(:empty) > *, [type="button"][aria-busy="true"]:not(:empty) > *, [type="reset"][aria-busy="true"]:not(:empty) > *, [role="button"][aria-busy="true"]:not(:empty) > * {
53
+ opacity: 0;
54
+ }
55
+ button[aria-busy="true"]:not(:empty)::before, [type="submit"][aria-busy="true"]:not(:empty)::before, [type="button"][aria-busy="true"]:not(:empty)::before, [type="reset"][aria-busy="true"]:not(:empty)::before, [role="button"][aria-busy="true"]:not(:empty)::before {
56
+ position: absolute;
57
+ margin: auto;
58
+ inset: 0;
59
+ }
60
+
43
61
  }
@@ -0,0 +1,28 @@
1
+ @layer blades {
2
+ /*\3c !--section:docs-->
3
+
4
+ A `<dialog>` opened with `dialog.showModal()` fades in and its `<article>` zooms in, without JS classes.
5
+ Pico's modal JS (`.modal-is-open`, `.modal-is-opening`, `.modal-is-closing`) still works on top of it.
6
+
7
+ - `dialog.close()` closes it at once, as before.
8
+ - `<dialog open>` in markup and non-modal `dialog.show()` aren't animated.
9
+ - Browsers without `@starting-style`, and reduced motion, open it at once.
10
+
11
+ \3c !--section:code-->```css */
12
+ dialog:modal {
13
+ transition: opacity var(--pico-transition);
14
+ }
15
+ dialog:modal > article {
16
+ transition: transform var(--pico-transition);
17
+ }
18
+ @starting-style {
19
+ dialog:modal {
20
+ opacity: 0;
21
+ }
22
+
23
+ dialog:modal > article {
24
+ transform: scale(0.96);
25
+ }
26
+ }
27
+
28
+ }
@@ -0,0 +1,24 @@
1
+ @layer blades {
2
+ /*\3c !--section:docs-->
3
+
4
+ Use `dl.timeline` or wrap a `<dl>` with `.has-timeline` to style it as a
5
+ vertical timeline — each `<dd>` gets a left border strip acting as the track:
6
+
7
+ <article class="has-timeline">
8
+
9
+ May 11, 2026
10
+ : First Blades CSS stable release (v2.2.0).
11
+
12
+ Mar 15, 2025
13
+ : Last Pico CSS update (v2.1.1).
14
+
15
+ </article>
16
+
17
+ \3c !--section:code-->```css */
18
+ dl.timeline dd, .has-timeline > dl dd {
19
+ margin-block: 0;
20
+ padding: 0.25rem 0 0.75rem 1rem;
21
+ border-inline-start: 0.25rem solid var(--blades-timeline-border-color);
22
+ }
23
+
24
+ }
@@ -532,7 +532,11 @@ label > details.dropdown {
532
532
  --pico-loading-spinner-opacity: 0.5;
533
533
  }
534
534
 
535
- [aria-busy="true"]:not(input, select, textarea, html, form) {
535
+ [aria-busy="true"]:not(input, select, textarea, html, form):not(
536
+ :where(button, [type="submit"], [type="button"], [type="reset"], [role="button"])
537
+ ) {
538
+ /* :where() zeroes the specificity of the button list inside :not(), so this rule stays
539
+ * low-specificity and doesn't override the more specific button rules below */
536
540
  white-space: nowrap;
537
541
  }
538
542
  [aria-busy="true"]:not(input, select, textarea, html, form)::before {
@@ -561,6 +565,19 @@ a[aria-busy="true"] {
561
565
  pointer-events: none;
562
566
  }
563
567
 
568
+ /* Buttons keep their size: the label stays in place but hidden, the spinner sits on top */
569
+ button[aria-busy="true"]:not(:empty), [type="submit"][aria-busy="true"]:not(:empty), [type="button"][aria-busy="true"]:not(:empty), [type="reset"][aria-busy="true"]:not(:empty), [role="button"][aria-busy="true"]:not(:empty) {
570
+ position: relative;
571
+ color: transparent;
572
+ }
573
+ button[aria-busy="true"]:not(:empty) > *, [type="submit"][aria-busy="true"]:not(:empty) > *, [type="button"][aria-busy="true"]:not(:empty) > *, [type="reset"][aria-busy="true"]:not(:empty) > *, [role="button"][aria-busy="true"]:not(:empty) > * {
574
+ opacity: 0;
575
+ }
576
+ button[aria-busy="true"]:not(:empty)::before, [type="submit"][aria-busy="true"]:not(:empty)::before, [type="button"][aria-busy="true"]:not(:empty)::before, [type="reset"][aria-busy="true"]:not(:empty)::before, [role="button"][aria-busy="true"]:not(:empty)::before {
577
+ position: absolute;
578
+ margin: auto;
579
+ inset: 0;
580
+ }
564
581
  /**
565
582
  * Modal (<dialog>)
566
583
  */
@@ -0,0 +1,32 @@
1
+ @layer blades {
2
+ /*\3c !--section:docs-->
3
+
4
+ The `<pre><code>` blocks are Prism-compatible and support captions via `data-caption="..."` attribute:
5
+
6
+ ```treeview {data-caption="Blades CSS ships:"}
7
+ /css/
8
+ ├── blades.css (Pico CSS successor)
9
+ ├── blades.standalone.css (framework-agnostic)
10
+ ├── ninja.css (experimental add-ons)
11
+ └── pico.css (underlying fork)
12
+ ```
13
+
14
+ \3c !--section:code-->
15
+ ```css */
16
+ @media (width < 768px) {
17
+ pre {
18
+ border-radius: 0
19
+ }
20
+ }
21
+
22
+ /* Code block caption via data-attr (to display filename, etc.) */
23
+
24
+ code[data-caption]::before {
25
+ display: block;
26
+ margin-bottom: 1rem;
27
+ content: attr(data-caption);
28
+ font-style: italic;
29
+ opacity: 50%;
30
+ }
31
+
32
+ }
@@ -0,0 +1,60 @@
1
+ @layer blades {
2
+ /* Extends https://github.com/picocss/pico/blob/main/scss/content/_link.scss
3
+ \3c !--section:code-->
4
+ ```css */
5
+ /* Use inline flex only if link contains an icon */
6
+ a:not(.does-not-exist):has(> i) {
7
+ display: inline-flex;
8
+ overflow-y: clip; /* to work in pair with text-underline-offset in Safari */
9
+ gap: 0.375ch; /* =3/8 */
10
+ text-wrap: balance;
11
+ }
12
+ a:not(.does-not-exist) > i {
13
+ float: left; /* ✅ Chrome ❌ Safari */
14
+ font-style: normal;
15
+ text-underline-offset: -2em; /* ❌ Chrome ✅ Safari - to clip it with overflow-y */
16
+ }
17
+ /* Favicons */
18
+ a:not(.does-not-exist) > i > img {
19
+ display: inline-block; /* for Tailwind CSS Typography */
20
+ max-width: none; /* to keep ratio safe */
21
+ height: 1.25em;
22
+ margin-block-start: calc(-0.25em / 2);
23
+ }
24
+ a:not(.does-not-exist) > i[class^="fa-"],
25
+ a:not(.does-not-exist) > i[class*=" fa-"] {
26
+ line-height: inherit;
27
+ --fa-width: auto;
28
+ }
29
+ /* Font Awesome */
30
+ a:not(.does-not-exist) > i.fa-lg {
31
+ line-height: normal;
32
+ }
33
+ /*```
34
+ \3c !--section:summary-->
35
+
36
+ Use *Bl*ades `<i>`-helper to wrap emojis, favicons, or simply drop Font Awesome icons inside links.
37
+ It automatically handles sizing and alignment while preventing underline on icons.
38
+
39
+ \3c !--section:docs-->
40
+
41
+ <article class="breakout-item">
42
+
43
+ | Use `<i>`-helper with | Clean HTML without `<span>ning` |
44
+ | ------------------------------------------------------------------------------------- | ------------------------------------ |
45
+ | [<i>🥷</i> Emojis](#) | `<a><i>🥷</i> Text</a>` |
46
+ | [<i>![](https://www.google.com/s2/favicons?domain=any.digital&sz=64)</i> Favicons](#) | `<a><i><img src="..."></i> Text</a>` |
47
+ | [<i class="fa-brands fa-github fa-lg"></i> Font Awesome icons](#) | `<a><i class="fa-..."></i> Text</a>` |
48
+ </article>
49
+
50
+ Or even for:
51
+
52
+ <article>
53
+ <a href="#" style="margin: 0 0 0 1rem"><i>🥷</i> very-very-very-very-very-<br>long-multiline-links</a>
54
+ </article>
55
+
56
+ How we made it: https://codepen.io/editor/anydigital/pen/019d2b94-5616-75dc-a23e-e111869d5237
57
+
58
+ \3c !--section--> */
59
+
60
+ }
@@ -0,0 +1,103 @@
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
+ /*\3c !--section:docs-->
8
+
9
+ First, we target either:
10
+ 1. `<label>` which `:has` inner form inputs (classless approach)
11
+ 2. or explicit `.has-float-label` class (explicit approach)
12
+
13
+ ```css */
14
+ label:has(> span):has(
15
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
16
+ textarea,
17
+ select
18
+ ),
19
+ .has-float-label {
20
+ display: block;
21
+ position: relative;
22
+ /*```
23
+ Finally, we detect if placeholder is shown, but not in focus. That means we can safely hide it, and enlarge the float label instead:
24
+ ```css */
25
+ }
26
+ /*```
27
+ Then, we define the default/fallback state (when the float label should be minimized):
28
+ ```css */
29
+ label:has(> span):has(
30
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
31
+ textarea,
32
+ select
33
+ ) > span,
34
+ label:has(> span):has(
35
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
36
+ textarea,
37
+ select
38
+ ) label,
39
+ .has-float-label > span,
40
+ .has-float-label label {
41
+ position: absolute;
42
+ top: 0;
43
+ left: 0;
44
+ font-size: 75%;
45
+ cursor: text;
46
+ }
47
+ label:has(> span):has(
48
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
49
+ textarea,
50
+ select
51
+ ) *:placeholder-shown:not(:focus)::-moz-placeholder, .has-float-label *:placeholder-shown:not(:focus)::-moz-placeholder {
52
+ opacity: 0;
53
+ }
54
+ label:has(> span):has(
55
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
56
+ textarea,
57
+ select
58
+ ) *:-moz-placeholder:not(:focus)::placeholder, .has-float-label *:-moz-placeholder:not(:focus)::placeholder {
59
+ opacity: 0;
60
+ }
61
+ label:has(> span):has(
62
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
63
+ textarea,
64
+ select
65
+ ) *:placeholder-shown:not(:focus)::placeholder, .has-float-label *:placeholder-shown:not(:focus)::placeholder {
66
+ opacity: 0;
67
+ }
68
+ label:has(> span):has(
69
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
70
+ textarea,
71
+ select
72
+ ):has(*:-moz-placeholder:not(:focus)) > span, label:has(> span):has(
73
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
74
+ textarea,
75
+ select
76
+ ):has(*:-moz-placeholder:not(:focus)) label, .has-float-label:has(*:-moz-placeholder:not(:focus)) > span, .has-float-label:has(*:-moz-placeholder:not(:focus)) label {
77
+ font-size: inherit;
78
+ opacity: 50%;
79
+ }
80
+ label:has(> span):has(
81
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
82
+ textarea,
83
+ select
84
+ ):has(*:placeholder-shown:not(:focus)) > span,
85
+ label:has(> span):has(
86
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
87
+ textarea,
88
+ select
89
+ ):has(*:placeholder-shown:not(:focus)) label,
90
+ .has-float-label:has(*:placeholder-shown:not(:focus)) > span,
91
+ .has-float-label:has(*:placeholder-shown:not(:focus)) label {
92
+ font-size: inherit;
93
+ opacity: 50%;
94
+ }
95
+ /*```
96
+
97
+ The `:has(*:placeholder-shown:not(:focus))` trick allows this input state information to *propagate* to the parent level. This enables modern CSS to target inner float label (`<span>` or `<label>`) regardless of its position relative to the input field.
98
+
99
+ Historically, this was not possible: the float label had to be placed after the input field to be targeted using the `input:focus + label` selector.
100
+
101
+ */
102
+
103
+ }
@@ -0,0 +1,110 @@
1
+ @layer blades {
2
+ label:has(> span):has(
3
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
4
+ textarea,
5
+ select
6
+ ),
7
+ .has-float-label {
8
+
9
+ /* Enlarged state */
10
+ }
11
+ /* Default/fallback state */
12
+ label:has(> span):has(
13
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
14
+ textarea,
15
+ select
16
+ ) > span,
17
+ label:has(> span):has(
18
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
19
+ textarea,
20
+ select
21
+ ) label,
22
+ .has-float-label > span,
23
+ .has-float-label label {
24
+ padding-inline-start: calc(1rem + 1px); /* match Pico's padding + border */
25
+ padding-block-start: 0.25rem;
26
+ opacity: 75%;
27
+ transition: all 0.25s;
28
+ }
29
+ label:has(> span):has(
30
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
31
+ textarea,
32
+ select
33
+ ) input,
34
+ label:has(> span):has(
35
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
36
+ textarea,
37
+ select
38
+ ) textarea,
39
+ label:has(> span):has(
40
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
41
+ textarea,
42
+ select
43
+ ) select,
44
+ .has-float-label input,
45
+ .has-float-label textarea,
46
+ .has-float-label select {
47
+ margin-block-start: 0; /* reset Pico */
48
+ padding-inline-start: 1rem; /* match Pico */
49
+ padding-block: 1.125rem 0.375rem; /* match Pico's total: 2 x 0.75rem = 1.5rem */
50
+ }
51
+ label:has(> span):has(
52
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
53
+ textarea,
54
+ select
55
+ ) input::-moz-placeholder, label:has(> span):has(
56
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
57
+ textarea,
58
+ select
59
+ ) textarea::-moz-placeholder, label:has(> span):has(
60
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
61
+ textarea,
62
+ select
63
+ ) select::-moz-placeholder, .has-float-label input::-moz-placeholder, .has-float-label textarea::-moz-placeholder, .has-float-label select::-moz-placeholder {
64
+ opacity: 100%;
65
+ -moz-transition: all 0.25s;
66
+ transition: all 0.25s;
67
+ }
68
+ label:has(> span):has(
69
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
70
+ textarea,
71
+ select
72
+ ) input::placeholder, label:has(> span):has(
73
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
74
+ textarea,
75
+ select
76
+ ) textarea::placeholder, label:has(> span):has(
77
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
78
+ textarea,
79
+ select
80
+ ) select::placeholder, .has-float-label input::placeholder, .has-float-label textarea::placeholder, .has-float-label select::placeholder {
81
+ opacity: 100%;
82
+ transition: all 0.25s;
83
+ }
84
+ label:has(> span):has(
85
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
86
+ textarea,
87
+ select
88
+ ):has(*:-moz-placeholder:not(:focus)) > span, label:has(> span):has(
89
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
90
+ textarea,
91
+ select
92
+ ):has(*:-moz-placeholder:not(:focus)) label, .has-float-label:has(*:-moz-placeholder:not(:focus)) > span, .has-float-label:has(*:-moz-placeholder:not(:focus)) label {
93
+ padding-block: 0.75rem; /* match Pico */
94
+ }
95
+ label:has(> span):has(
96
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
97
+ textarea,
98
+ select
99
+ ):has(*:placeholder-shown:not(:focus)) > span,
100
+ label:has(> span):has(
101
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
102
+ textarea,
103
+ select
104
+ ):has(*:placeholder-shown:not(:focus)) label,
105
+ .has-float-label:has(*:placeholder-shown:not(:focus)) > span,
106
+ .has-float-label:has(*:placeholder-shown:not(:focus)) label {
107
+ padding-block: 0.75rem; /* match Pico */
108
+ }
109
+
110
+ }