@anyblades/blades 0.28.0 → 0.30.0
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 +83 -65
- package/_includes/blades/html.liquid +1 -1
- package/_includes/blades/html.njk +1 -1
- package/assets/blades.css +521 -177
- package/assets/{blades.core.css → blades.standalone.core.css} +41 -46
- package/assets/blades.standalone.css +857 -0
- package/assets/{blades.theme.css → blades.standalone.theme.css} +2 -2
- package/assets/breakout.css +6 -6
- package/assets/float-label.core.css +2 -2
- package/assets/float-label.css +2 -2
- package/assets/link-icon.css +4 -4
- package/assets/responsive-table.css +5 -5
- package/blades.gemspec +1 -1
- package/package.json +5 -6
- package/src/_layout.css +4 -4
- package/src/_utilities.css +2 -4
- package/src/blades.css +6 -2
- package/src/blades.standalone.css +2 -0
- package/src/content/_code.css +1 -2
- package/src/content/_table.css +1 -2
- package/src/content/_typography.css +6 -7
- package/assets/pico.blades.css +0 -1211
- package/src/pico.blades.css +0 -6
- /package/{LICENSE → LICENSE.md} +0 -0
- /package/src/{blades.core.css → blades.standalone.core.css} +0 -0
- /package/src/{blades.theme.css → blades.standalone.theme.css} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
|
|
2
|
+
\3c !--section:code-->
|
|
3
3
|
```css */
|
|
4
4
|
/* Default/fallback state */
|
|
5
5
|
label:has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select) > span,
|
|
@@ -126,4 +126,4 @@ table pre {
|
|
|
126
126
|
text-decoration-style: dotted;
|
|
127
127
|
}
|
|
128
128
|
/*```
|
|
129
|
-
|
|
129
|
+
\3c !--section--> */
|
package/assets/breakout.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
|
|
2
|
+
\3c !--section:code-->
|
|
3
3
|
```css */
|
|
4
4
|
.breakout,
|
|
5
5
|
.breakout-all {
|
|
@@ -76,17 +76,17 @@
|
|
|
76
76
|
transform: translateX(-50%);
|
|
77
77
|
}
|
|
78
78
|
/*```
|
|
79
|
-
|
|
79
|
+
\3c !--section:summary-->
|
|
80
80
|
|
|
81
81
|
The `.breakout` layout allows images, tables, and other figures to automatically extend or bleed beyond their parent container’s width.
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
\3c !--section:docs-->
|
|
84
84
|
|
|
85
|
-
### Demo
|
|
85
|
+
### Demo \3c !-- inside parent .breakout -->
|
|
86
86
|
|
|
87
87
|
Break out a wide image from the text flow:
|
|
88
88
|
|
|
89
|
-
<div
|
|
89
|
+
<div>\3c !-- Dummy div to avoid p tag in Markdown --></div><img
|
|
90
90
|
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>">
|
|
91
91
|
|
|
92
92
|
Or table:
|
|
@@ -115,4 +115,4 @@ Or anything else:
|
|
|
115
115
|
<h2>Heading 2</h2><h3>Heading 3</h3><h4>Heading 4</h4><h5>Heading 5</h5><h6>Heading 6</h6>
|
|
116
116
|
<hr>
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
\3c !--section--> */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Moved here from https://github.com/anyblades/float-label-css for easier maintenance
|
|
2
|
-
|
|
2
|
+
\3c !--section:docs-->
|
|
3
3
|
|
|
4
4
|
First, we target either:
|
|
5
5
|
1. `<label>` which `:has` inner form inputs (classless approach)
|
|
@@ -53,4 +53,4 @@ label:has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea
|
|
|
53
53
|
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.
|
|
54
54
|
|
|
55
55
|
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.
|
|
56
|
-
|
|
56
|
+
\3c !--section--> */
|
package/assets/float-label.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Float Label CSS v2.0.0-alpha */
|
|
2
2
|
/* Moved here from https://github.com/anyblades/float-label-css for easier maintenance
|
|
3
|
-
|
|
3
|
+
\3c !--section:docs-->
|
|
4
4
|
|
|
5
5
|
First, we target either:
|
|
6
6
|
1. `<label>` which `:has` inner form inputs (classless approach)
|
|
@@ -54,7 +54,7 @@ label:has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea
|
|
|
54
54
|
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.
|
|
55
55
|
|
|
56
56
|
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.
|
|
57
|
-
|
|
57
|
+
\3c !--section--> */
|
|
58
58
|
/* Default/fallback state */
|
|
59
59
|
label:has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select) > span,
|
|
60
60
|
label:has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select) label,
|
package/assets/link-icon.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Extends https://github.com/picocss/pico/blob/main/scss/content/_link.scss
|
|
2
|
-
|
|
2
|
+
\3c !--section:code-->
|
|
3
3
|
```css */
|
|
4
4
|
/* Use inline flex only if link contains an icon */
|
|
5
5
|
a:has(> i) {
|
|
@@ -29,12 +29,12 @@ a > i.fa-lg {
|
|
|
29
29
|
line-height: normal;
|
|
30
30
|
}
|
|
31
31
|
/*```
|
|
32
|
-
|
|
32
|
+
\3c !--section:summary-->
|
|
33
33
|
|
|
34
34
|
Use *Bl*ades `<i>`-helper to wrap emojis, favicons, or simply drop Font Awesome icons inside links.
|
|
35
35
|
It automatically handles sizing and alignment while preventing underline on icons.
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
\3c !--section:docs-->
|
|
38
38
|
|
|
39
39
|
<article class="breakout-item">
|
|
40
40
|
|
|
@@ -55,4 +55,4 @@ How we made it: https://codepen.io/editor/anydigital/pen/019d2b94-5616-75dc-a23e
|
|
|
55
55
|
|
|
56
56
|
**PRO** example of automatic favicons for `11ty`: https://blades.ninja/build-awesome-11ty/processors/#auto-link-favicons
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
\3c !--section--> */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
|
|
2
|
+
\3c !--section:code-->
|
|
3
3
|
```css */
|
|
4
4
|
table.responsive,
|
|
5
5
|
.breakout > table:not(.does-not-exist),
|
|
@@ -31,12 +31,12 @@ table.responsive th,
|
|
|
31
31
|
/*```
|
|
32
32
|
`table:not(.does-not-exist)` trick (inspired by postcss) is used here to increase specificity against selectors like `&:is(table, .table)`
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
\3c !--section:summary-->
|
|
35
35
|
|
|
36
36
|
`.responsive` makes a table full-bleed and scroll on mobile, without a need for a redundant wrapper (finally).
|
|
37
37
|
Tables inside https://blades.ninja/css/breakout/ are responsive by default.
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
\3c !--section:docs-->
|
|
40
40
|
|
|
41
41
|
### Demo table
|
|
42
42
|
|
|
@@ -48,10 +48,10 @@ Tables inside https://blades.ninja/css/breakout/ are responsive by default.
|
|
|
48
48
|
|
|
49
49
|
---
|
|
50
50
|
|
|
51
|
-
Living examples:
|
|
51
|
+
Living examples: \3c !--A-Z-->
|
|
52
52
|
- https://blades.ninja/ai/ide/
|
|
53
53
|
- https://blades.ninja/build-awesome-11ty/starters/
|
|
54
54
|
- https://blades.ninja/css/frameworks/
|
|
55
55
|
- https://blades.ninja/ssg/
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
\3c !--section--> */
|
package/blades.gemspec
CHANGED
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anyblades/blades",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"description": "Framework-agnostic CSS utilities and single-file Liquid 'blades' for modern web development.",
|
|
5
5
|
"style": "./assets/blades.css",
|
|
6
6
|
"exports": {
|
|
7
|
-
".": "./src/blades.css",
|
|
8
|
-
"./core": "./src/blades.core.css",
|
|
9
|
-
"./theme": "./src/blades.theme.css",
|
|
10
|
-
"./float-label": "./src/float-label.css"
|
|
11
|
-
"./pico": "./src/pico.blades.css"
|
|
7
|
+
".": "./src/blades.standalone.css",
|
|
8
|
+
"./core": "./src/blades.standalone.core.css",
|
|
9
|
+
"./theme": "./src/blades.standalone.theme.css",
|
|
10
|
+
"./float-label": "./src/float-label.css"
|
|
12
11
|
},
|
|
13
12
|
"scripts": {
|
|
14
13
|
"postcss": "postcss './src/!(_)*.css' --dir ./assets",
|
package/src/_layout.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Extends https://github.com/picocss/pico/blob/main/scss/layout/
|
|
2
|
-
<!--section:docs-->
|
|
2
|
+
<!--section:docs,columns-->
|
|
3
3
|
|
|
4
4
|
### Auto-columns
|
|
5
5
|
|
|
@@ -17,10 +17,10 @@ The smaller the font size, the more columns will be created:
|
|
|
17
17
|
|
|
18
18
|
Useful for tables of contents and long lists.
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
How it works:
|
|
21
21
|
```css */
|
|
22
22
|
.columns {
|
|
23
|
-
columns:
|
|
23
|
+
columns: 25ch auto; /* common container 65ch / 25ch => 2 columns max, with a buffer for list paddings */
|
|
24
24
|
|
|
25
25
|
/* Avoid breaking inside elements, such as nested lists */
|
|
26
26
|
> * {
|
|
@@ -28,7 +28,7 @@ Useful for tables of contents and long lists.
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
/*```
|
|
31
|
-
|
|
31
|
+
<!--section:docs,jump-->
|
|
32
32
|
|
|
33
33
|
### Jump to top
|
|
34
34
|
|
package/src/_utilities.css
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<p>Look how cool <big class="dark-auto">🔥🕷️🐦⬛🐄🦓</big> can look in the dark!</p>
|
|
10
10
|
</article>
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
How it works:
|
|
13
13
|
```css */
|
|
14
14
|
/* Per https://picocss.com/docs/css-variables#css-variables-for-color-schemes */
|
|
15
15
|
:root {
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
/*```
|
|
30
|
-
</details>
|
|
31
30
|
|
|
32
31
|
### Faded
|
|
33
32
|
|
|
@@ -37,7 +36,7 @@
|
|
|
37
36
|
Hover to unfade me!
|
|
38
37
|
</article>
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
How it works:
|
|
41
40
|
```css */
|
|
42
41
|
.faded {
|
|
43
42
|
opacity: 50%;
|
|
@@ -47,7 +46,6 @@
|
|
|
47
46
|
}
|
|
48
47
|
}
|
|
49
48
|
/*```
|
|
50
|
-
</details>
|
|
51
49
|
<!--section--> */
|
|
52
50
|
|
|
53
51
|
/* Fix the scrollbar color when inverted by https://tailwindcss.com/docs/filter-invert */
|
package/src/blades.css
CHANGED
package/src/content/_code.css
CHANGED
|
@@ -11,7 +11,7 @@ The `<pre><code>` blocks are Prism-compatible and support captions via `data-cap
|
|
|
11
11
|
├── blades.theme.css # minimal opinionated theme
|
|
12
12
|
└── blades.css # above two together
|
|
13
13
|
```
|
|
14
|
-
|
|
14
|
+
How it works:
|
|
15
15
|
```css */
|
|
16
16
|
pre {
|
|
17
17
|
padding: 1rem 1.5rem;
|
|
@@ -54,5 +54,4 @@ code {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
/*```
|
|
57
|
-
</details>
|
|
58
57
|
<!--section--> */
|
package/src/content/_table.css
CHANGED
|
@@ -18,7 +18,7 @@ Living examples of big tables with `<hr>`-expanders: <!--A-Z-->
|
|
|
18
18
|
- https://blades.ninja/css/frameworks/
|
|
19
19
|
- https://blades.ninja/ssg/
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
How it works:
|
|
22
22
|
```css */
|
|
23
23
|
th {
|
|
24
24
|
hr {
|
|
@@ -36,7 +36,6 @@ th {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
/*```
|
|
39
|
-
</details>
|
|
40
39
|
|
|
41
40
|
### Borderless table
|
|
42
41
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Extends https://github.com/picocss/pico/blob/main/scss/content/_typography.scss
|
|
2
|
-
<!--section:docs-->
|
|
2
|
+
<!--section:docs,h-anchor-->
|
|
3
3
|
|
|
4
4
|
### Heading anchors
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ Links with `href="#..."` inside headings are automatically displayed as anchors:
|
|
|
9
9
|
<h2 style="margin: 0 0 0 1.5rem">Heading with anchor <a href="#hwa" style="visibility: visible">#</a></h2>
|
|
10
10
|
</article>
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
How it works:
|
|
13
13
|
```css */
|
|
14
14
|
h1,
|
|
15
15
|
h2,
|
|
@@ -38,10 +38,11 @@ h6 {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
/*```
|
|
41
|
-
</details>
|
|
42
41
|
|
|
43
42
|
**PRO** example of automatic anchors for `11ty`+`markdown-it-anchor`: https://github.com/anyblades/eleventy-blades/blob/main/src/eleventy.config.js
|
|
44
43
|
|
|
44
|
+
<!--section:docs,list-->
|
|
45
|
+
|
|
45
46
|
### List markers
|
|
46
47
|
|
|
47
48
|
Customize markers using inline `style="--list-marker:..."` on `<ul>/<ol>` or even individual `<li>`:
|
|
@@ -59,7 +60,7 @@ Customize markers using inline `style="--list-marker:..."` on `<ul>/<ol>` or eve
|
|
|
59
60
|
{style="--list-marker:'→ '"}
|
|
60
61
|
</article>
|
|
61
62
|
|
|
62
|
-
|
|
63
|
+
How it works:
|
|
63
64
|
```css */
|
|
64
65
|
ul,
|
|
65
66
|
ol {
|
|
@@ -78,7 +79,6 @@ ol {
|
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
81
|
/*```
|
|
81
|
-
</details>
|
|
82
82
|
|
|
83
83
|
### Unlist
|
|
84
84
|
|
|
@@ -95,7 +95,7 @@ ol {
|
|
|
95
95
|
|
|
96
96
|
`.unlist-all` also removes styling from all nested lists.
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
How it works:
|
|
99
99
|
```css */
|
|
100
100
|
ul,
|
|
101
101
|
ol {
|
|
@@ -110,5 +110,4 @@ ol {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
/*```
|
|
113
|
-
</details>
|
|
114
113
|
<!--section--> */
|