@anyblades/blades 3.1.0-beta.4 → 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 (35) hide show
  1. package/README.md +19 -10
  2. package/css/blades.css +4 -4
  3. package/css/blades.min.css +1 -1
  4. package/css/blades.ninja.css +4 -4
  5. package/css/blades.ninja.min.css +1 -1
  6. package/css/layered/blades.layered.css +4 -4
  7. package/css/layered/blades.layered.min.css +1 -1
  8. package/css/layered/components/dropdown-popover.css +107 -0
  9. package/css/layered/components/modal-modern.css +28 -0
  10. package/css/layered/components/timeline.css +24 -0
  11. package/css/layered/content/code-block.css +32 -0
  12. package/css/layered/content/icon.css +60 -0
  13. package/css/layered/forms/float-label/core.css +103 -0
  14. package/css/layered/forms/float-label/theme.css +110 -0
  15. package/css/layered/forms/float-label.css +210 -0
  16. package/css/layered/layout/columns.css +30 -0
  17. package/css/layered/variables-blades.css +23 -0
  18. package/package.json +3 -3
  19. package/src/blades/_index.css +8 -8
  20. package/src/blades/{_dropdown-popover.css → components/_dropdown-popover.css} +3 -3
  21. package/src/float-label.css +1 -1
  22. package/src/ninja/_index.css +1 -1
  23. package/_includes/blades/links.liquid +0 -21
  24. package/_includes/blades/links.njk +0 -9
  25. package/_includes/blades/links.twig +0 -18
  26. /package/src/blades/{_variables.css → _variables-blades.css} +0 -0
  27. /package/src/blades/{_modal.css → components/_modal-modern.css} +0 -0
  28. /package/src/blades/{_timeline.css → components/_timeline.css} +0 -0
  29. /package/src/blades/{_code.css → content/_code-block.css} +0 -0
  30. /package/src/blades/{_icon.css → content/_icon.css} +0 -0
  31. /package/src/blades/{float-label → forms/float-label}/_core.css +0 -0
  32. /package/src/blades/{float-label → forms/float-label}/_index.css +0 -0
  33. /package/src/blades/{float-label → forms/float-label}/_theme.css +0 -0
  34. /package/src/blades/{_columns.css → layout/_columns.css} +0 -0
  35. /package/src/ninja/{_page-anchors.css → _scroll-to.css} +0 -0
@@ -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
+ }
@@ -0,0 +1,210 @@
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
+ label:has(> span):has(
103
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
104
+ textarea,
105
+ select
106
+ ),
107
+ .has-float-label {
108
+
109
+ /* Enlarged state */
110
+ }
111
+ /* Default/fallback state */
112
+ label:has(> span):has(
113
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
114
+ textarea,
115
+ select
116
+ ) > span,
117
+ label:has(> span):has(
118
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
119
+ textarea,
120
+ select
121
+ ) label,
122
+ .has-float-label > span,
123
+ .has-float-label label {
124
+ padding-inline-start: calc(1rem + 1px); /* match Pico's padding + border */
125
+ padding-block-start: 0.25rem;
126
+ opacity: 75%;
127
+ transition: all 0.25s;
128
+ }
129
+ label:has(> span):has(
130
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
131
+ textarea,
132
+ select
133
+ ) input,
134
+ label:has(> span):has(
135
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
136
+ textarea,
137
+ select
138
+ ) textarea,
139
+ label:has(> span):has(
140
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
141
+ textarea,
142
+ select
143
+ ) select,
144
+ .has-float-label input,
145
+ .has-float-label textarea,
146
+ .has-float-label select {
147
+ margin-block-start: 0; /* reset Pico */
148
+ padding-inline-start: 1rem; /* match Pico */
149
+ padding-block: 1.125rem 0.375rem; /* match Pico's total: 2 x 0.75rem = 1.5rem */
150
+ }
151
+ label:has(> span):has(
152
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
153
+ textarea,
154
+ select
155
+ ) input::-moz-placeholder, label:has(> span):has(
156
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
157
+ textarea,
158
+ select
159
+ ) textarea::-moz-placeholder, label:has(> span):has(
160
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
161
+ textarea,
162
+ select
163
+ ) select::-moz-placeholder, .has-float-label input::-moz-placeholder, .has-float-label textarea::-moz-placeholder, .has-float-label select::-moz-placeholder {
164
+ opacity: 100%;
165
+ -moz-transition: all 0.25s;
166
+ transition: all 0.25s;
167
+ }
168
+ label:has(> span):has(
169
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
170
+ textarea,
171
+ select
172
+ ) input::placeholder, label:has(> span):has(
173
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
174
+ textarea,
175
+ select
176
+ ) textarea::placeholder, label:has(> span):has(
177
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
178
+ textarea,
179
+ select
180
+ ) select::placeholder, .has-float-label input::placeholder, .has-float-label textarea::placeholder, .has-float-label select::placeholder {
181
+ opacity: 100%;
182
+ transition: all 0.25s;
183
+ }
184
+ label:has(> span):has(
185
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
186
+ textarea,
187
+ select
188
+ ):has(*:-moz-placeholder:not(:focus)) > span, label:has(> span):has(
189
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
190
+ textarea,
191
+ select
192
+ ):has(*:-moz-placeholder:not(:focus)) label, .has-float-label:has(*:-moz-placeholder:not(:focus)) > span, .has-float-label:has(*:-moz-placeholder:not(:focus)) label {
193
+ padding-block: 0.75rem; /* match Pico */
194
+ }
195
+ label:has(> span):has(
196
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
197
+ textarea,
198
+ select
199
+ ):has(*:placeholder-shown:not(:focus)) > span,
200
+ label:has(> span):has(
201
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
202
+ textarea,
203
+ select
204
+ ):has(*:placeholder-shown:not(:focus)) label,
205
+ .has-float-label:has(*:placeholder-shown:not(:focus)) > span,
206
+ .has-float-label:has(*:placeholder-shown:not(:focus)) label {
207
+ padding-block: 0.75rem; /* match Pico */
208
+ }
209
+
210
+ }
@@ -0,0 +1,30 @@
1
+ @layer blades {
2
+ /*\3c !--section:docs-->
3
+
4
+ `.columns` automatically creates columns with at least 30 characters each:
5
+
6
+ <article class="columns">
7
+ <p>1</p><p>2</p><p>3</p><p>4</p><p>5</p><p>6</p>
8
+ </article>
9
+
10
+ The smaller the font size, the more columns will be created:
11
+
12
+ <article class="columns" style="font-size: 65%">
13
+ <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>
14
+ </article>
15
+
16
+ Useful for tables of contents and long lists.
17
+
18
+ \3c !--section:code-->
19
+ ```css */
20
+ .columns {
21
+ -moz-columns: 25ch auto;
22
+ columns: 25ch auto; /* common container 65ch / 25ch => 2 columns max, with a buffer for list paddings */
23
+ }
24
+ /* Avoid breaking inside elements, such as nested lists */
25
+ .columns > * {
26
+ -moz-column-break-inside: avoid;
27
+ break-inside: avoid;
28
+ }
29
+
30
+ }
@@ -0,0 +1,23 @@
1
+ @layer blades {
2
+ :scope,
3
+ :host {
4
+ /**
5
+ * Design Tokens !!! NAMING NOT FINALIZED YET !!!
6
+ * `--in-pico: *` props below are for reference only (not to be used)
7
+ */
8
+ --blades-token-primary: var(--pico-primary, dodgerblue);
9
+ --in-pico: #01aaff;
10
+ --blades-token-secondary: var(--pico-secondary, lightslategray);
11
+ --in-pico: #969eaf;
12
+
13
+ /**
14
+ * Inherited Variables
15
+ */
16
+ --blades-timeline-border-color: color-mix(
17
+ in srgb,
18
+ var(--blades-token-secondary) 50%,
19
+ transparent
20
+ );
21
+ }
22
+
23
+ }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@anyblades/blades",
3
- "version": "3.1.0-beta.4",
3
+ "version": "3.1.0-beta.5",
4
4
  "style": "./src/blades.css",
5
5
  "exports": {
6
6
  ".": "./src/blades.css",
7
7
  "./compact": "./src/blades/_compact.css",
8
- "./float-label/*": "./src/blades/float-label/_*.css",
8
+ "./float-label/*": "./src/blades/forms/float-label/_*.css",
9
9
  "./pico": "./src/pico.css",
10
10
  "./pico/components": "./src/pico/components/_index.css",
11
11
  "./pico/components/*": "./src/pico/components/_*.css",
@@ -36,7 +36,7 @@
36
36
  "build:minify": "for f in css/*.css; do case $f in *.min.css|css/pico.conditional.*) ;; *) lightningcss --minify $f -o ${f%.css}.min.css || exit 1;; esac; done",
37
37
  "build:conditional": "for f in '' .min; do { printf '@scope (.pico) {\\n'; cat ./css/pico${f}.css; printf '\\n}\\n'; } > ./css/pico.conditional${f}.css; done",
38
38
  "build:layered": "npm run build:layered:css && npm run build:layered:wrap && npm run build:layered:clean",
39
- "build:layered:css": "rm -rf css/layered && postcss --config css './src/pico/**/_*.css' '!./src/pico/_index.css' ./src/blades/_compact.css --base src --dir css/layered --no-map && mv css/layered/pico/* css/layered/blades/* css/layered/ && rmdir css/layered/pico css/layered/blades",
39
+ "build:layered:css": "rm -rf css/layered && for d in pico blades; do postcss --config css \"./src/$d/**/_*.css\" \"!./src/$d/_index.css\" --base src/$d --dir css/layered --no-map || exit 1; done",
40
40
  "build:layered:wrap": "for f in css/blades.css css/blades.min.css $(find css/layered -name '_*.css'); do case $f in css/blades*) n=${f##*/}; o=css/layered/${n%%.*}.layered.${n#*.};; *) d=${f%/*}; n=${f##*/_}; [ $n = index.css ] && o=$d.css || o=$d/$n;; esac; { printf '@layer blades {\\n'; cat $f; printf '\\n}\\n'; } > $o || exit 1; done",
41
41
  "build:layered:clean": "find css/layered -name '_*.css' -delete",
42
42
  "start": "npm run build:css -- --watch",
@@ -7,22 +7,22 @@
7
7
 
8
8
  /* Follows https://github.com/picocss/pico/blob/main/scss/_index.scss */
9
9
 
10
- @import "./_variables";
10
+ @import "./_variables-blades";
11
11
 
12
12
  /* Layout */
13
- @import "./_columns";
13
+ @import "./layout/_columns";
14
14
 
15
15
  /* Content */
16
- @import "./_code";
16
+ @import "./content/_code-block";
17
17
 
18
18
  /* Forms */
19
- @import "./float-label/_index";
19
+ @import "./forms/float-label/_index";
20
20
 
21
21
  /* Components */
22
- @import "./_modal";
23
- @import "./_icon";
24
- @import "./_dropdown-popover";
25
- @import "./_timeline";
22
+ @import "./components/_modal-modern";
23
+ @import "./content/_icon";
24
+ @import "./components/_dropdown-popover";
25
+ @import "./components/_timeline";
26
26
 
27
27
  /* Compact version (opt-in via `data-compact` attr anywhere) */
28
28
  @import "./_compact";
@@ -80,8 +80,8 @@ that toggles it, with no JS:
80
80
  width: 100%;
81
81
  }
82
82
  }
83
- /* Beats Pico's `nav ul:first-of-type` / `:last-of-type` margins */
84
- nav :is(ul, menu)[popover] {
83
+ /* Beats Pico's `nav ul:first-of-type` / `:last-of-type` margins whatever the load order (soft win via :not) */
84
+ nav :is(ul, menu)[popover]:not(.does-not-exist) {
85
85
  margin: auto;
86
86
  }
87
87
  @starting-style {
@@ -93,7 +93,7 @@ nav :is(ul, menu)[popover] {
93
93
  /* Next to the button that opened it (its implicit anchor) */
94
94
  @supports (position-area: bottom) {
95
95
  :is(ul, menu)[popover],
96
- nav :is(ul, menu)[popover] {
96
+ nav :is(ul, menu)[popover]:not(.does-not-exist) {
97
97
  inset: auto;
98
98
  margin: 0;
99
99
  margin-top: var(--pico-outline-width);
@@ -1 +1 @@
1
- @import "./blades/float-label/_index";
1
+ @import "./blades/forms/float-label/_index";
@@ -6,7 +6,7 @@
6
6
 
7
7
  /* Layout */
8
8
  @import "./_container-breakout";
9
- @import "./_page-anchors";
9
+ @import "./_scroll-to";
10
10
 
11
11
  /* Content */
12
12
  @import "./_heading-anchor";
@@ -1,21 +0,0 @@
1
- {% comment %}<!--section:code-->```liquid{% endcomment %}
2
- <ul>
3
- {%- for link in links %}
4
- <li>
5
- {% # prettier-ignore %}
6
- <a href="{{ link.url }}" {% if link.url == current_url %}aria-current="page"{% endif %}>
7
- {{- link.title -}}
8
- </a>
9
- </li>
10
- {%- endfor %}
11
- </ul>
12
- {% # prettier-ignore %}
13
- {% comment %}```
14
- <!--section:docs-->
15
- Usage example for https://www.11ty.dev/docs/plugins/navigation/#bring-your-own-html-render-the-menu-items-manually:
16
-
17
- ```liquid
18
- {% assign links = collections.all | eleventyNavigation %}
19
- {% render blades/links, links: links, current_url: page.url %}
20
- ```
21
- <!--section-->{% endcomment %}
@@ -1,9 +0,0 @@
1
- <ul>
2
- {%- for link in links %}
3
- <li>
4
- <a href="{{ link.url }}" {% if link.url == current_url %}aria-current="page"{% endif %}>
5
- {{- link.title | safe -}}
6
- </a>
7
- </li>
8
- {%- endfor %}
9
- </ul>
@@ -1,18 +0,0 @@
1
- {# <!--section:code-->```twig #}
2
- <ul>
3
- {%- for link in links %}
4
- <li>
5
- <a href="{{ link.url }}" {% if link.url == current_url %}aria-current="page"{% endif %}>
6
- {{- link.title -}}
7
- </a>
8
- </li>
9
- {%- endfor %}
10
- </ul>
11
- {#```
12
- <!--section:docs-->
13
- Pass the links and the current URL explicitly so nothing else leaks into scope:
14
-
15
- ```twig
16
- {% include 'blades/links.twig' with { links: menu, current_url: app.request.pathInfo } only %}
17
- ```
18
- <!--section--> #}