@anydigital/blades 0.27.0-beta.11 → 0.27.0-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -1
- package/assets/blades.css +29 -8
- package/assets/link-icon.css +63 -0
- package/blades.gemspec +1 -1
- package/package.json +1 -1
- package/src/blades.css +1 -1
- package/src/link-icon.css +63 -0
- package/src/_link.css +0 -42
package/README.md
CHANGED
|
@@ -136,8 +136,16 @@ Or use a preconfigured template:
|
|
|
136
136
|
|
|
137
137
|
- Featured by:
|
|
138
138
|
- https://github.com/uhub/awesome-css
|
|
139
|
-
- 🕶️ [awesome-eleventy](https://github.com/anydigital/awesome-11ty-build-awesome)
|
|
140
139
|
- [https://jekyll-themes.com/](https://jekyll-themes.com/anydigital/blades)
|
|
140
|
+
- 🕶️ [awesome-eleventy](https://github.com/anydigital/awesome-11ty-build-awesome)
|
|
141
|
+
- 🚀 [build-awesome-starter](https://github.com/anydigital/build-awesome-starter)
|
|
142
|
+
- 🚀 [bladeswitch starter](https://github.com/anydigital/bladeswitch)
|
|
143
|
+
- https://github.com/hostfurl/minformhf starter
|
|
144
|
+
- Showcase:
|
|
145
|
+
- https://any.digital/ (Pico ⁺ Blades)
|
|
146
|
+
- https://build.blades.ninja/ (Tailwind ⁺ Blades)
|
|
147
|
+
- https://bladeswitch.com/ (Pico ⁺ Blades)
|
|
148
|
+
- https://minform.hostfurl.com/ (Pico ⁺ Blades)
|
|
141
149
|
- Credits:
|
|
142
150
|
- https://picocss.com/ for inspiration
|
|
143
151
|
- https://11ty.dev/ for build power
|
package/assets/blades.css
CHANGED
|
@@ -282,10 +282,25 @@ ol {
|
|
|
282
282
|
```css */
|
|
283
283
|
|
|
284
284
|
a {
|
|
285
|
+
/* Display as inline flex, if it contains an icon */
|
|
286
|
+
&:has(> i) {
|
|
287
|
+
display: inline-flex;
|
|
288
|
+
align-items: center;
|
|
289
|
+
gap: 0.375ch; /* =3/8 */
|
|
290
|
+
overflow-y: clip; /* to work in pair with text-underline-offset in Safari */
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/* Font Awesome specials */
|
|
294
|
+
&:has(> i[class^="fa-"]),
|
|
295
|
+
&:has(> i[class*=" fa-"]) {
|
|
296
|
+
gap: 0.125ch; /* =1/8 */
|
|
297
|
+
}
|
|
298
|
+
|
|
285
299
|
/* Helper to handle [fav]icons in links */
|
|
286
300
|
> i {
|
|
287
|
-
display: inline-block;
|
|
288
301
|
font-style: normal;
|
|
302
|
+
float: left; /* ✅ Chrome ❌ Safari */
|
|
303
|
+
text-underline-offset: 1em; /* ❌ Chrome ✅ Safari - to clip it with overflow-y */
|
|
289
304
|
|
|
290
305
|
> img {
|
|
291
306
|
height: 1.25em;
|
|
@@ -302,24 +317,30 @@ a {
|
|
|
302
317
|
|
|
303
318
|
<!--section:docs-->
|
|
304
319
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
Wrap [fav]icons inside links using `<i>... </i>` helper to size automatically and avoid underline. Compare:
|
|
320
|
+
Wrap icons, favicons, or even emojis inside links using simple `<i>`-helper to size them automatically and prevent underline. Compare:
|
|
308
321
|
|
|
309
322
|
<big class="grid">
|
|
310
|
-
<article><a href="https://blades.ninja/"> 🥷
|
|
311
|
-
<article><a href="https://blades.ninja/"><i
|
|
323
|
+
<article><a href="https://blades.ninja/"> 🥷 Blades</a></article>
|
|
324
|
+
<article><a href="https://blades.ninja/"><i>🥷</i> Blades</a></article>
|
|
312
325
|
</big>
|
|
313
326
|
|
|
314
327
|
<big class="grid">
|
|
315
328
|
<article><a href="https://any.digital/">
|
|
316
|
-
<img src="https://www.google.com/s2/favicons?domain=any.digital&sz=64"
|
|
329
|
+
<img src="https://www.google.com/s2/favicons?domain=any.digital&sz=64"> any.digital
|
|
317
330
|
</a></article>
|
|
318
331
|
<article><a href="https://any.digital/">
|
|
319
|
-
<i><img src="https://www.google.com/s2/favicons?domain=any.digital&sz=64"
|
|
332
|
+
<i><img src="https://www.google.com/s2/favicons?domain=any.digital&sz=64"></i> any.digital
|
|
320
333
|
</a></article>
|
|
321
334
|
</big>
|
|
322
335
|
|
|
336
|
+
Or simply drop-in any Font Awesome icon (without wrapping it):
|
|
337
|
+
|
|
338
|
+
<big><article><a href="https://github.com/anydigital/blades"><i class="fa-brands fa-github fa-lg"></i> /anydigital/blades</a></article></big>
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
[How we made it ↗ <small>(on Codepen)</small>](https://codepen.io/editor/anydigital/pen/019d2b94-5616-75dc-a23e-e111869d5237){role=button .outline}
|
|
343
|
+
|
|
323
344
|
<!--section--> */
|
|
324
345
|
|
|
325
346
|
/* Extends https://github.com/picocss/pico/blob/main/scss/content/_table.scss
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/* Extends https://github.com/picocss/pico/blob/main/scss/content/_link.scss
|
|
2
|
+
<!--section:code-->
|
|
3
|
+
```css */
|
|
4
|
+
a {
|
|
5
|
+
/* Display as inline flex, if it contains an icon */
|
|
6
|
+
&:has(> i) {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: 0.375ch; /* =3/8 */
|
|
10
|
+
overflow-y: clip; /* to work in pair with text-underline-offset in Safari */
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Font Awesome specials */
|
|
14
|
+
&:has(> i[class^="fa-"]),
|
|
15
|
+
&:has(> i[class*=" fa-"]) {
|
|
16
|
+
gap: 0.125ch; /* =1/8 */
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Helper to handle [fav]icons in links */
|
|
20
|
+
> i {
|
|
21
|
+
font-style: normal;
|
|
22
|
+
float: left; /* ✅ Chrome ❌ Safari */
|
|
23
|
+
text-underline-offset: 1em; /* ❌ Chrome ✅ Safari - to clip it with overflow-y */
|
|
24
|
+
|
|
25
|
+
> img {
|
|
26
|
+
height: 1.25em;
|
|
27
|
+
margin-block: calc(-0.25em / 2);
|
|
28
|
+
|
|
29
|
+
/* for tw-typography (.prose) */
|
|
30
|
+
display: inline-block;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/*```
|
|
35
|
+
> **PRO-TIP** for 11ty: https://blades.ninja/build-awesome-11ty/processors/#auto-link-favicons
|
|
36
|
+
|
|
37
|
+
<!--section:docs-->
|
|
38
|
+
|
|
39
|
+
Wrap icons, favicons, or even emojis inside links using simple `<i>`-helper to size them automatically and prevent underline. Compare:
|
|
40
|
+
|
|
41
|
+
<big class="grid">
|
|
42
|
+
<article><a href="https://blades.ninja/"> 🥷 Blades</a></article>
|
|
43
|
+
<article><a href="https://blades.ninja/"><i>🥷</i> Blades</a></article>
|
|
44
|
+
</big>
|
|
45
|
+
|
|
46
|
+
<big class="grid">
|
|
47
|
+
<article><a href="https://any.digital/">
|
|
48
|
+
<img src="https://www.google.com/s2/favicons?domain=any.digital&sz=64"> any.digital
|
|
49
|
+
</a></article>
|
|
50
|
+
<article><a href="https://any.digital/">
|
|
51
|
+
<i><img src="https://www.google.com/s2/favicons?domain=any.digital&sz=64"></i> any.digital
|
|
52
|
+
</a></article>
|
|
53
|
+
</big>
|
|
54
|
+
|
|
55
|
+
Or simply drop-in any Font Awesome icon (without wrapping it):
|
|
56
|
+
|
|
57
|
+
<big><article><a href="https://github.com/anydigital/blades"><i class="fa-brands fa-github fa-lg"></i> /anydigital/blades</a></article></big>
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
[How we made it ↗ <small>(on Codepen)</small>](https://codepen.io/editor/anydigital/pen/019d2b94-5616-75dc-a23e-e111869d5237){role=button .outline}
|
|
62
|
+
|
|
63
|
+
<!--section--> */
|
package/blades.gemspec
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |spec|
|
|
4
4
|
spec.name = "blades"
|
|
5
|
-
spec.version = "0.27.0-beta.
|
|
5
|
+
spec.version = "0.27.0-beta.12"
|
|
6
6
|
spec.authors = ["Anton Staroverov"]
|
|
7
7
|
|
|
8
8
|
spec.summary = "Framework-agnostic CSS utilities and single-file Liquid 'blades' for modern web development."
|
package/package.json
CHANGED
package/src/blades.css
CHANGED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/* Extends https://github.com/picocss/pico/blob/main/scss/content/_link.scss
|
|
2
|
+
<!--section:code-->
|
|
3
|
+
```css */
|
|
4
|
+
a {
|
|
5
|
+
/* Display as inline flex, if it contains an icon */
|
|
6
|
+
&:has(> i) {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: 0.375ch; /* =3/8 */
|
|
10
|
+
overflow-y: clip; /* to work in pair with text-underline-offset in Safari */
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Font Awesome specials */
|
|
14
|
+
&:has(> i[class^="fa-"]),
|
|
15
|
+
&:has(> i[class*=" fa-"]) {
|
|
16
|
+
gap: 0.125ch; /* =1/8 */
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Helper to handle [fav]icons in links */
|
|
20
|
+
> i {
|
|
21
|
+
font-style: normal;
|
|
22
|
+
float: left; /* ✅ Chrome ❌ Safari */
|
|
23
|
+
text-underline-offset: 1em; /* ❌ Chrome ✅ Safari - to clip it with overflow-y */
|
|
24
|
+
|
|
25
|
+
> img {
|
|
26
|
+
height: 1.25em;
|
|
27
|
+
margin-block: calc(-0.25em / 2);
|
|
28
|
+
|
|
29
|
+
/* for tw-typography (.prose) */
|
|
30
|
+
display: inline-block;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/*```
|
|
35
|
+
> **PRO-TIP** for 11ty: https://blades.ninja/build-awesome-11ty/processors/#auto-link-favicons
|
|
36
|
+
|
|
37
|
+
<!--section:docs-->
|
|
38
|
+
|
|
39
|
+
Wrap icons, favicons, or even emojis inside links using simple `<i>`-helper to size them automatically and prevent underline. Compare:
|
|
40
|
+
|
|
41
|
+
<big class="grid">
|
|
42
|
+
<article><a href="https://blades.ninja/"> 🥷 Blades</a></article>
|
|
43
|
+
<article><a href="https://blades.ninja/"><i>🥷</i> Blades</a></article>
|
|
44
|
+
</big>
|
|
45
|
+
|
|
46
|
+
<big class="grid">
|
|
47
|
+
<article><a href="https://any.digital/">
|
|
48
|
+
<img src="https://www.google.com/s2/favicons?domain=any.digital&sz=64"> any.digital
|
|
49
|
+
</a></article>
|
|
50
|
+
<article><a href="https://any.digital/">
|
|
51
|
+
<i><img src="https://www.google.com/s2/favicons?domain=any.digital&sz=64"></i> any.digital
|
|
52
|
+
</a></article>
|
|
53
|
+
</big>
|
|
54
|
+
|
|
55
|
+
Or simply drop-in any Font Awesome icon (without wrapping it):
|
|
56
|
+
|
|
57
|
+
<big><article><a href="https://github.com/anydigital/blades"><i class="fa-brands fa-github fa-lg"></i> /anydigital/blades</a></article></big>
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
[How we made it ↗ <small>(on Codepen)</small>](https://codepen.io/editor/anydigital/pen/019d2b94-5616-75dc-a23e-e111869d5237){role=button .outline}
|
|
62
|
+
|
|
63
|
+
<!--section--> */
|
package/src/_link.css
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/* Extends https://github.com/picocss/pico/blob/main/scss/content/_link.scss
|
|
2
|
-
<!--section:code-->
|
|
3
|
-
```css */
|
|
4
|
-
a {
|
|
5
|
-
/* Helper to handle [fav]icons in links */
|
|
6
|
-
> i {
|
|
7
|
-
display: inline-block;
|
|
8
|
-
font-style: normal;
|
|
9
|
-
|
|
10
|
-
> img {
|
|
11
|
-
height: 1.25em;
|
|
12
|
-
margin-block: calc(-0.25em / 2);
|
|
13
|
-
|
|
14
|
-
/* for tw-typography (.prose) */
|
|
15
|
-
display: inline-block;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
/*```
|
|
20
|
-
> **PRO-TIP** for 11ty: https://blades.ninja/build-awesome-11ty/processors/#auto-link-favicons
|
|
21
|
-
|
|
22
|
-
<!--section:docs-->
|
|
23
|
-
|
|
24
|
-
### Link [fav]icons
|
|
25
|
-
|
|
26
|
-
Wrap [fav]icons inside links using `<i>... </i>` helper to size automatically and avoid underline. Compare:
|
|
27
|
-
|
|
28
|
-
<big class="grid">
|
|
29
|
-
<article><a href="https://blades.ninja/"> 🥷 Blades</a></article>
|
|
30
|
-
<article><a href="https://blades.ninja/"><i>🥷 </i>Blades</a></article>
|
|
31
|
-
</big>
|
|
32
|
-
|
|
33
|
-
<big class="grid">
|
|
34
|
-
<article><a href="https://any.digital/">
|
|
35
|
-
<img src="https://www.google.com/s2/favicons?domain=any.digital&sz=64" > any.digital
|
|
36
|
-
</a></article>
|
|
37
|
-
<article><a href="https://any.digital/">
|
|
38
|
-
<i><img src="https://www.google.com/s2/favicons?domain=any.digital&sz=64"> </i>any.digital
|
|
39
|
-
</a></article>
|
|
40
|
-
</big>
|
|
41
|
-
|
|
42
|
-
<!--section--> */
|