@anyblades/blades 2.4.9 → 3.0.0-alpha.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.
- package/.github/ISSUE_TEMPLATE/bug_report.md +25 -0
- package/.github/ISSUE_TEMPLATE/config.yml +8 -0
- package/.prettierrc.json +6 -0
- package/README.md +111 -150
- package/_includes/blades/html.njk +1 -1
- package/_includes/blades/html.twig +1 -1
- package/context7.json +4 -0
- package/css/blades.css +436 -153
- package/css/blades.min.css +145 -0
- package/css/blades.standalone.css +197 -222
- package/css/blades.standalone.min.css +37 -0
- package/css/{blades.ninja.css → ninja.css} +7 -2
- package/css/ninja.min.css +5 -0
- package/css/pico.conditional.css +3189 -0
- package/css/pico.conditional.min.css +107 -0
- package/css/pico.css +3186 -0
- package/css/pico.min.css +105 -0
- package/css/postcss.config.js +23 -0
- package/index.html +63 -0
- package/package.json +27 -11
- package/src/blades.css +4 -3
- package/src/blades.standalone.css +2 -2
- package/src/{blades.ninja.css → ninja.css} +7 -2
- package/src/pico/_components.css +974 -0
- package/src/pico/_content.css +608 -0
- package/src/pico/_forms.css +747 -0
- package/src/pico/_index.css +12 -0
- package/src/pico/_layout.css +128 -0
- package/src/pico/_utilities.css +53 -0
- package/src/pico/_variables.css +671 -0
- package/src/pico.css +1 -0
- package/src/standalone/_core.css +32 -0
- package/src/{blades.standalone.theme.css → standalone/_theme.css} +2 -2
- package/src/{_utilities.css → standalone/_utilities.css} +1 -1
- package/src/standalone/_variables.css +20 -0
- package/src/{link-icon.css → standalone/components/_icon-helper.css} +0 -2
- package/src/{components → standalone/components}/_timeline.css +1 -1
- package/src/{content → standalone/content}/_code.css +6 -5
- package/src/{content/_typography.css → standalone/content/_list.css} +4 -42
- package/src/standalone/content/_typography.css +38 -0
- package/src/{float-label.core.css → standalone/forms/_float-label.core.css} +12 -4
- package/src/standalone/forms/_float-label.css +2 -0
- package/src/{breakout.css → standalone/layout/_breakout.css} +3 -6
- package/src/{_layout.css → standalone/layout/_columns.css} +2 -12
- package/src/standalone/layout/_scroller.css +10 -0
- package/_config.yml +0 -5
- package/blades.gemspec +0 -16
- package/css/blades.standalone.core.css +0 -712
- package/css/blades.standalone.theme.css +0 -143
- package/css/breakout.css +0 -125
- package/css/float-label.core.css +0 -56
- package/css/float-label.css +0 -96
- package/css/float-label.theme.css +0 -39
- package/css/link-icon.css +0 -59
- package/css/responsive-table.css +0 -57
- package/src/blades.standalone.core.css +0 -23
- package/src/float-label.css +0 -3
- /package/src/{responsive-table.css → standalone/content/_table-responsive.css} +0 -0
- /package/src/{content → standalone/content}/_table.css +0 -0
- /package/src/{float-label.theme.css → standalone/forms/_float-label.theme.css} +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Blades CSS standalone kit v3 🥷
|
|
3
|
+
* Copyright 2026 (https://blades.ninja/css/standalone/)
|
|
4
|
+
* Licensed under MIT
|
|
5
|
+
*/
|
|
6
|
+
/*<!--section:code-->```css */
|
|
7
|
+
|
|
8
|
+
/* Follows https://github.com/picocss/pico/blob/main/scss/_index.scss */
|
|
9
|
+
|
|
10
|
+
@import "./_variables";
|
|
11
|
+
|
|
12
|
+
/* Layout */
|
|
13
|
+
@import "./layout/_breakout";
|
|
14
|
+
@import "./layout/_columns";
|
|
15
|
+
@import "./layout/_scroller";
|
|
16
|
+
|
|
17
|
+
/* Content */
|
|
18
|
+
@import "./content/_typography";
|
|
19
|
+
@import "./content/_list";
|
|
20
|
+
@import "./content/_table";
|
|
21
|
+
@import "./content/_table-responsive";
|
|
22
|
+
@import "./content/_code";
|
|
23
|
+
|
|
24
|
+
/* Forms */
|
|
25
|
+
@import "./forms/_float-label.core";
|
|
26
|
+
|
|
27
|
+
/* Components */
|
|
28
|
+
@import "./components/_icon-helper";
|
|
29
|
+
@import "./components/_timeline";
|
|
30
|
+
|
|
31
|
+
/* Utilities */
|
|
32
|
+
@import "./_utilities";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*<!--section:code-->```css */
|
|
2
|
-
@import "./
|
|
2
|
+
@import "./forms/_float-label.theme";
|
|
3
3
|
|
|
4
4
|
html {
|
|
5
5
|
/* Prevent horizontal overflow and scrolling, modern way. */
|
|
@@ -99,7 +99,7 @@ table {
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
[
|
|
102
|
+
[href="#top"] {
|
|
103
103
|
opacity: 25%;
|
|
104
104
|
&:hover {
|
|
105
105
|
opacity: 75%;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
:scope,
|
|
2
|
+
:host {
|
|
3
|
+
/**
|
|
4
|
+
* Design Tokens !!! NAMING NOT FINALIZED YET !!!
|
|
5
|
+
* `--in-pico: *` props below are for reference only (not to be used)
|
|
6
|
+
*/
|
|
7
|
+
--blades-token-primary: var(--pico-primary, dodgerblue);
|
|
8
|
+
--in-pico: #01aaff;
|
|
9
|
+
--blades-token-secondary: var(--pico-secondary, lightslategray);
|
|
10
|
+
--in-pico: #969eaf;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Inherited Variables
|
|
14
|
+
*/
|
|
15
|
+
--blades-timeline-border-color: color-mix(
|
|
16
|
+
in srgb,
|
|
17
|
+
var(--blades-token-secondary) 50%,
|
|
18
|
+
transparent
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
The `<pre><code>` blocks are Prism-compatible and support captions via `data-caption="..."` attribute:
|
|
4
4
|
|
|
5
|
-
```treeview {data-caption="Blades CSS:"}
|
|
6
|
-
|
|
7
|
-
├── blades.
|
|
8
|
-
├── blades.
|
|
9
|
-
|
|
5
|
+
```treeview {data-caption="Blades CSS ships:"}
|
|
6
|
+
/css/
|
|
7
|
+
├── blades.css (Pico CSS successor)
|
|
8
|
+
├── blades.standalone.css (framework-agnostic)
|
|
9
|
+
├── ninja.css (experimental add-ons)
|
|
10
|
+
└── pico.css (underlying fork)
|
|
10
11
|
```
|
|
11
12
|
|
|
12
13
|
<!--section:code-->
|
|
@@ -1,44 +1,6 @@
|
|
|
1
|
-
/*<!--section:
|
|
1
|
+
/*<!--section:docs-->
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<article>
|
|
6
|
-
<h2 style="margin: 0 0 0 1.5rem">Heading with anchor <a aria-hidden="true" style="visibility: visible">#</a></h2>
|
|
7
|
-
</article>
|
|
8
|
-
|
|
9
|
-
How it works:
|
|
10
|
-
```css */
|
|
11
|
-
h1,
|
|
12
|
-
h2,
|
|
13
|
-
h3,
|
|
14
|
-
h4,
|
|
15
|
-
h5,
|
|
16
|
-
h6 {
|
|
17
|
-
position: relative;
|
|
18
|
-
|
|
19
|
-
a[aria-hidden="true"] {
|
|
20
|
-
position: absolute;
|
|
21
|
-
right: 100%;
|
|
22
|
-
top: 50%;
|
|
23
|
-
transform: translateY(-50%);
|
|
24
|
-
padding-right: 0.2ch;
|
|
25
|
-
color: silver;
|
|
26
|
-
text-decoration: none;
|
|
27
|
-
visibility: hidden;
|
|
28
|
-
}
|
|
29
|
-
@media /* to avoid double-tap on touch devices */ (hover: hover) {
|
|
30
|
-
&:hover {
|
|
31
|
-
a[aria-hidden="true"] {
|
|
32
|
-
visibility: visible;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
/*```
|
|
38
|
-
|
|
39
|
-
**PRO** example of automatic anchors for `11ty`+`markdown-it-anchor`: https://github.com/anyblades/eleventy-blades/blob/main/src/eleventy.config.js
|
|
40
|
-
|
|
41
|
-
<!--section:list-->
|
|
3
|
+
## Custom markers
|
|
42
4
|
|
|
43
5
|
Customize markers using inline `style="--list-marker:..."` on `<ul>/<ol>` or even individual `<li>`:
|
|
44
6
|
|
|
@@ -75,7 +37,7 @@ ol {
|
|
|
75
37
|
}
|
|
76
38
|
/*```
|
|
77
39
|
|
|
78
|
-
|
|
40
|
+
## Markerless
|
|
79
41
|
|
|
80
42
|
`.markerless` removes markers and reduces padding:
|
|
81
43
|
|
|
@@ -102,7 +64,7 @@ ol {
|
|
|
102
64
|
}
|
|
103
65
|
/*```
|
|
104
66
|
|
|
105
|
-
|
|
67
|
+
## Unlist
|
|
106
68
|
|
|
107
69
|
`.unlist` removes list styling at all:
|
|
108
70
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*<!--section:docs-->
|
|
2
|
+
|
|
3
|
+
## Heading anchors
|
|
4
|
+
|
|
5
|
+
Links with `href="#..."` inside headings are automatically displayed as anchors:
|
|
6
|
+
|
|
7
|
+
<article>
|
|
8
|
+
<h2 style="margin: 0 0 0 1.5rem">Heading with anchor <a aria-hidden="true" style="visibility: visible">#</a></h2>
|
|
9
|
+
</article>
|
|
10
|
+
|
|
11
|
+
How it works:
|
|
12
|
+
```css */
|
|
13
|
+
h1,
|
|
14
|
+
h2,
|
|
15
|
+
h3,
|
|
16
|
+
h4,
|
|
17
|
+
h5,
|
|
18
|
+
h6 {
|
|
19
|
+
position: relative;
|
|
20
|
+
|
|
21
|
+
a[aria-hidden="true"] {
|
|
22
|
+
position: absolute;
|
|
23
|
+
right: 100%;
|
|
24
|
+
top: 50%;
|
|
25
|
+
transform: translateY(-50%);
|
|
26
|
+
padding-right: 0.2ch;
|
|
27
|
+
color: silver;
|
|
28
|
+
text-decoration: none;
|
|
29
|
+
visibility: hidden;
|
|
30
|
+
}
|
|
31
|
+
@media /* to avoid double-tap on touch devices */ (hover: hover) {
|
|
32
|
+
&:hover {
|
|
33
|
+
a[aria-hidden="true"] {
|
|
34
|
+
visibility: visible;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Float Label CSS v2 by Blades CSS 🥷🏷️
|
|
3
|
+
* Copyright 2016–2026 (https://blades.ninja/css/float-label/)
|
|
4
|
+
* Licensed under MIT
|
|
5
|
+
*/
|
|
6
|
+
/*<!--section:docs-->
|
|
3
7
|
|
|
4
8
|
First, we target either:
|
|
5
9
|
1. `<label>` which `:has` inner form inputs (classless approach)
|
|
6
10
|
2. or explicit `.has-float-label` class (explicit approach)
|
|
7
11
|
|
|
8
12
|
```css */
|
|
9
|
-
label:has(> span):has(
|
|
13
|
+
label:has(> span):has(
|
|
14
|
+
input:not([type="checkbox"], [type="radio"], [type="range"]),
|
|
15
|
+
textarea,
|
|
16
|
+
select
|
|
17
|
+
),
|
|
10
18
|
.has-float-label {
|
|
11
19
|
display: block;
|
|
12
20
|
position: relative;
|
|
@@ -41,4 +49,4 @@ The `:has(*:placeholder-shown:not(:focus))` trick allows this input state inform
|
|
|
41
49
|
|
|
42
50
|
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.
|
|
43
51
|
|
|
44
|
-
|
|
52
|
+
*/
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
|
|
37
37
|
/* Max out the width of the element */
|
|
38
38
|
&.breakout-item-max {
|
|
39
|
-
width: min(125%, 100dvw) !important;
|
|
39
|
+
width: min(125%, 100dvw) !important;
|
|
40
|
+
/* !important is for cases like figure.breakout-item-max @TODO */
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
}
|
|
@@ -86,13 +87,9 @@
|
|
|
86
87
|
}
|
|
87
88
|
}
|
|
88
89
|
/*```
|
|
89
|
-
<!--section:summary-->
|
|
90
|
-
|
|
91
|
-
The `.breakout` layout allows images, tables, and other figures to automatically extend or bleed beyond their parent container’s width.
|
|
92
|
-
|
|
93
90
|
<!--section:docs-->
|
|
94
91
|
|
|
95
|
-
|
|
92
|
+
The `.breakout` layout allows images, tables, and other figures to automatically extend or bleed beyond their parent container’s width.
|
|
96
93
|
|
|
97
94
|
Break out a wide image from the text flow:
|
|
98
95
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*<!--section:
|
|
1
|
+
/*<!--section:docs-->
|
|
2
2
|
|
|
3
3
|
`.columns` automatically creates columns with at least 30 characters each:
|
|
4
4
|
|
|
@@ -14,7 +14,7 @@ The smaller the font size, the more columns will be created:
|
|
|
14
14
|
|
|
15
15
|
Useful for tables of contents and long lists.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
<!--section:code-->
|
|
18
18
|
```css */
|
|
19
19
|
.columns {
|
|
20
20
|
columns: 25ch auto; /* common container 65ch / 25ch => 2 columns max, with a buffer for list paddings */
|
|
@@ -24,13 +24,3 @@ How it works:
|
|
|
24
24
|
break-inside: avoid;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
/*```<!--section:jump-->
|
|
28
|
-
|
|
29
|
-
`data-jump-to="top"` fixes element to the corner and adds extra top padding to make it easy to click:
|
|
30
|
-
```css */
|
|
31
|
-
[data-jump-to="top"] {
|
|
32
|
-
position: fixed;
|
|
33
|
-
bottom: 0;
|
|
34
|
-
right: 0;
|
|
35
|
-
padding-top: 50vh;
|
|
36
|
-
}
|
package/_config.yml
DELETED
package/blades.gemspec
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
Gem::Specification.new do |spec|
|
|
4
|
-
spec.name = "blades"
|
|
5
|
-
spec.version = "2.4.9"
|
|
6
|
-
|
|
7
|
-
spec.authors = ["Anton Staroverov"]
|
|
8
|
-
spec.homepage = "https://blades.ninja/"
|
|
9
|
-
spec.license = "MIT"
|
|
10
|
-
spec.summary = "Fully compatible and actively maintained successor to Pico CSS."
|
|
11
|
-
|
|
12
|
-
spec.files = Dir.glob("{_includes,css}/**/*")
|
|
13
|
-
# puts "spec.files: #{spec.files.inspect}"
|
|
14
|
-
|
|
15
|
-
spec.add_runtime_dependency "jekyll", ">= 3.5", "< 5.0"
|
|
16
|
-
end
|