@anyblades/blades 2.4.8 → 3.0.0-alpha.1

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 (58) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +25 -0
  2. package/.github/ISSUE_TEMPLATE/config.yml +8 -0
  3. package/.prettierrc.json +6 -0
  4. package/README.md +130 -104
  5. package/context7.json +4 -0
  6. package/css/blades.css +454 -198
  7. package/css/blades.min.css +145 -0
  8. package/css/blades.standalone.css +216 -272
  9. package/css/blades.standalone.min.css +37 -0
  10. package/css/{blades.ninja.css → ninja.css} +7 -2
  11. package/css/ninja.min.css +5 -0
  12. package/css/pico.conditional.css +3189 -0
  13. package/css/pico.conditional.min.css +107 -0
  14. package/css/pico.css +3186 -0
  15. package/css/pico.min.css +105 -0
  16. package/css/postcss.config.js +23 -0
  17. package/index.html +63 -0
  18. package/package.json +27 -11
  19. package/src/blades.css +4 -3
  20. package/src/blades.standalone.css +2 -2
  21. package/src/{blades.ninja.css → ninja.css} +7 -2
  22. package/src/pico/_components.css +974 -0
  23. package/src/pico/_content.css +608 -0
  24. package/src/pico/_forms.css +747 -0
  25. package/src/pico/_index.css +12 -0
  26. package/src/pico/_layout.css +128 -0
  27. package/src/pico/_utilities.css +53 -0
  28. package/src/pico/_variables.css +671 -0
  29. package/src/pico.css +1 -0
  30. package/src/standalone/_core.css +32 -0
  31. package/src/{blades.standalone.theme.css → standalone/_theme.css} +3 -7
  32. package/src/{_utilities.css → standalone/_utilities.css} +3 -4
  33. package/src/standalone/_variables.css +20 -0
  34. package/src/{link-icon.css → standalone/components/_icon-helper.css} +0 -2
  35. package/src/{components → standalone/components}/_timeline.css +1 -2
  36. package/src/{content → standalone/content}/_code.css +9 -12
  37. package/src/{content/_typography.css → standalone/content/_list.css} +4 -49
  38. package/src/{content → standalone/content}/_table.css +4 -7
  39. package/src/standalone/content/_typography.css +38 -0
  40. package/src/{float-label.core.css → standalone/forms/_float-label.core.css} +22 -14
  41. package/src/standalone/forms/_float-label.css +2 -0
  42. package/src/{breakout.css → standalone/layout/_breakout.css} +3 -6
  43. package/src/{_layout.css → standalone/layout/_columns.css} +2 -20
  44. package/src/standalone/layout/_scroller.css +10 -0
  45. package/_config.yml +0 -5
  46. package/blades.gemspec +0 -16
  47. package/css/blades.standalone.core.css +0 -738
  48. package/css/blades.standalone.theme.css +0 -147
  49. package/css/breakout.css +0 -125
  50. package/css/float-label.core.css +0 -56
  51. package/css/float-label.css +0 -96
  52. package/css/float-label.theme.css +0 -39
  53. package/css/link-icon.css +0 -59
  54. package/css/responsive-table.css +0 -57
  55. package/src/blades.standalone.core.css +0 -21
  56. package/src/float-label.css +0 -3
  57. /package/src/{responsive-table.css → standalone/content/_table-responsive.css} +0 -0
  58. /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,7 +1,5 @@
1
- /*
2
- <!--section:code-->
3
- ```css */
4
- @import "./float-label.theme";
1
+ /*<!--section:code-->```css */
2
+ @import "./forms/_float-label.theme";
5
3
 
6
4
  html {
7
5
  /* Prevent horizontal overflow and scrolling, modern way. */
@@ -101,7 +99,7 @@ table {
101
99
  }
102
100
  }
103
101
 
104
- [data-jump-to="top"] {
102
+ [href="#top"] {
105
103
  opacity: 25%;
106
104
  &:hover {
107
105
  opacity: 75%;
@@ -130,5 +128,3 @@ table {
130
128
  text-decoration-style: dotted;
131
129
  }
132
130
  }
133
- /*```
134
- <!--section--> */
@@ -1,7 +1,6 @@
1
- /* Extends https://github.com/picocss/pico/tree/main/scss/utilities
2
- <!--section:docs-->
1
+ /*<!--section:docs-->
3
2
 
4
- ### Auto-dark
3
+ ## Dark auto
5
4
 
6
5
  `.dark-auto` automatically creates a simple dark version of any element:
7
6
 
@@ -28,7 +27,7 @@ How it works:
28
27
  }
29
28
  /*```
30
29
 
31
- ### Faded
30
+ ## Faded
32
31
 
33
32
  `.faded` reduces the opacity of an element:
34
33
 
@@ -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
+ }
@@ -58,6 +58,4 @@ Or even for:
58
58
 
59
59
  How we made it: https://codepen.io/editor/anydigital/pen/019d2b94-5616-75dc-a23e-e111869d5237
60
60
 
61
- **PRO** example of automatic favicons for `11ty`: https://blades.ninja/build-awesome-11ty/processors/#auto-link-favicons
62
-
63
61
  <!--section--> */
@@ -19,7 +19,6 @@ dl.timeline,
19
19
  dd {
20
20
  padding: 0.25rem 0 0.75rem 1rem;
21
21
  margin-block: 0;
22
- border-inline-start: 0.25rem solid gray;
22
+ border-inline-start: 0.25rem solid var(--blades-timeline-border-color);
23
23
  }
24
24
  }
25
- /*```*/
@@ -1,17 +1,16 @@
1
- /* Extends https://github.com/picocss/pico/blob/main/scss/content/_code.scss
2
- <!--section:docs-->
3
-
4
- ### Code
1
+ /*<!--section:docs-->
5
2
 
6
3
  The `<pre><code>` blocks are Prism-compatible and support captions via `data-caption="..."` attribute:
7
4
 
8
- ```treeview {data-caption="Blades CSS:"}
9
- ./css/
10
- ├── blades.core.css # reusable class-light utilities, unthemed
11
- ├── blades.theme.css # minimal opinionated theme
12
- └── blades.css # above two together
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)
13
11
  ```
14
- How it works:
12
+
13
+ <!--section:code-->
15
14
  ```css */
16
15
  pre {
17
16
  @media (width < 768px) {
@@ -31,5 +30,3 @@ code {
31
30
  }
32
31
  }
33
32
  }
34
- /*```
35
- <!--section--> */
@@ -1,49 +1,6 @@
1
- /* Extends https://github.com/picocss/pico/blob/main/scss/content/_typography.scss
2
- <!--section:docs,h-anchor-->
1
+ /*<!--section:docs-->
3
2
 
4
- ### Heading anchors
5
-
6
- Links with `href="#..."` inside headings are automatically displayed as anchors:
7
-
8
- <article>
9
- <h2 style="margin: 0 0 0 1.5rem">Heading with anchor <a href="#hwa" style="visibility: visible">#</a></h2>
10
- </article>
11
-
12
- How it works:
13
- ```css */
14
- h1,
15
- h2,
16
- h3,
17
- h4,
18
- h5,
19
- h6 {
20
- position: relative;
21
-
22
- a[aria-hidden="true"] {
23
- position: absolute;
24
- right: 100%;
25
- top: 50%;
26
- transform: translateY(-50%);
27
- padding-right: 0.2ch;
28
- color: silver;
29
- text-decoration: none;
30
- visibility: hidden;
31
- }
32
- @media /* to avoid double-tap on touch devices */ (hover: hover) {
33
- &:hover {
34
- a[aria-hidden="true"] {
35
- visibility: visible;
36
- }
37
- }
38
- }
39
- }
40
- /*```
41
-
42
- **PRO** example of automatic anchors for `11ty`+`markdown-it-anchor`: https://github.com/anyblades/eleventy-blades/blob/main/src/eleventy.config.js
43
-
44
- <!--section:docs,list-->
45
-
46
- ### List markers
3
+ ## Custom markers
47
4
 
48
5
  Customize markers using inline `style="--list-marker:..."` on `<ul>/<ol>` or even individual `<li>`:
49
6
 
@@ -80,7 +37,7 @@ ol {
80
37
  }
81
38
  /*```
82
39
 
83
- ### Markerless
40
+ ## Markerless
84
41
 
85
42
  `.markerless` removes markers and reduces padding:
86
43
 
@@ -107,7 +64,7 @@ ol {
107
64
  }
108
65
  /*```
109
66
 
110
- ### Unlist
67
+ ## Unlist
111
68
 
112
69
  `.unlist` removes list styling at all:
113
70
 
@@ -136,5 +93,3 @@ ol {
136
93
  }
137
94
  }
138
95
  }
139
- /*```
140
- <!--section--> */
@@ -1,7 +1,6 @@
1
- /* Extends https://github.com/picocss/pico/blob/main/scss/content/_table.scss
2
- <!--section:docs-->
1
+ /*<!--section:docs-->
3
2
 
4
- ### Column expanders
3
+ ## Column expanders
5
4
 
6
5
  Place `<hr>` element inside `<th>` column to expand it horizontally:
7
6
 
@@ -37,7 +36,7 @@ th {
37
36
  }
38
37
  /*```
39
38
 
40
- ### Borderless table
39
+ ## Borderless table
41
40
 
42
41
  `.borderless` removes all default borders:
43
42
 
@@ -50,9 +49,7 @@ th {
50
49
  {.borderless}
51
50
  </article>
52
51
 
53
- Living example: https://bladeswitch.com/#minimal-dependencies table
54
-
55
- <!--section--> */
52
+ <!--section-->*/
56
53
  table.borderless {
57
54
  th,
58
55
  td {
@@ -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,18 +1,26 @@
1
- /* Moved here from https://github.com/anyblades/float-label-css for easier maintenance
2
- <!--section:docs-->
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)
11
+
7
12
  ```css */
8
- label:has(> span):has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea, select),
13
+ label:has(> span):has(
14
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
15
+ textarea,
16
+ select
17
+ ),
9
18
  .has-float-label {
10
19
  display: block;
11
20
  position: relative;
12
- /*
13
- ```
14
- Then, we define the default/fallback state (when the float label should be minimized):
15
- ```css */
21
+ /*```
22
+ Then, we define the default/fallback state (when the float label should be minimized):
23
+ ```css */
16
24
  > span,
17
25
  label {
18
26
  position: absolute;
@@ -21,10 +29,9 @@ Then, we define the default/fallback state (when the float label should be minim
21
29
  cursor: text;
22
30
  font-size: 75%;
23
31
  }
24
- /*
25
- ```
26
- Finally, we detect if placeholder is shown, but not in focus. That means we can safely hide it, and enlarge the float label instead:
27
- ```css */
32
+ /*```
33
+ Finally, we detect if placeholder is shown, but not in focus. That means we can safely hide it, and enlarge the float label instead:
34
+ ```css */
28
35
  *:placeholder-shown:not(:focus)::placeholder {
29
36
  opacity: 0;
30
37
  }
@@ -36,9 +43,10 @@ Finally, we detect if placeholder is shown, but not in focus. That means we can
36
43
  }
37
44
  }
38
45
  }
39
- /*
40
- ```
46
+ /*```
47
+
41
48
  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.
42
49
 
43
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.
44
- <!--section--> */
51
+
52
+ */
@@ -0,0 +1,2 @@
1
+ @import "./_float-label.core";
2
+ @import "./_float-label.theme";
@@ -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; /* !important is for cases like figure.breakout-item-max @TODO */
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
- ### Demo <!-- inside parent .breakout -->
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,7 +1,4 @@
1
- /* Extends https://github.com/picocss/pico/blob/main/scss/layout/
2
- <!--section:docs,columns-->
3
-
4
- ### Auto-columns
1
+ /*<!--section:docs-->
5
2
 
6
3
  `.columns` automatically creates columns with at least 30 characters each:
7
4
 
@@ -17,7 +14,7 @@ The smaller the font size, the more columns will be created:
17
14
 
18
15
  Useful for tables of contents and long lists.
19
16
 
20
- How it works:
17
+ <!--section:code-->
21
18
  ```css */
22
19
  .columns {
23
20
  columns: 25ch auto; /* common container 65ch / 25ch => 2 columns max, with a buffer for list paddings */
@@ -27,18 +24,3 @@ How it works:
27
24
  break-inside: avoid;
28
25
  }
29
26
  }
30
- /*```
31
- <!--section:docs,jump-->
32
-
33
- ### Jump to top
34
-
35
- `data-jump-to="top"` fixes element to the corner and adds extra top padding to make it easy to click:
36
- ```css */
37
- [data-jump-to="top"] {
38
- position: fixed;
39
- bottom: 0;
40
- right: 0;
41
- padding-top: 50vh;
42
- }
43
- /*```
44
- <!--section--> */
@@ -0,0 +1,10 @@
1
+ /*```<!--section:docs-->
2
+
3
+ `<a href="#top">` is automatically fixed to the bottom-right corner with extra top padding for easier clicking:
4
+ ```css */
5
+ [href="#top"] {
6
+ position: fixed;
7
+ bottom: 0;
8
+ right: 0;
9
+ padding-top: 50vh;
10
+ }
package/_config.yml DELETED
@@ -1,5 +0,0 @@
1
- exclude:
2
- - "**/*"
3
- include:
4
- - "css/**/*"
5
- - "*.md"
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.8"
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