@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.
Files changed (60) 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 +111 -150
  5. package/_includes/blades/html.njk +1 -1
  6. package/_includes/blades/html.twig +1 -1
  7. package/context7.json +4 -0
  8. package/css/blades.css +436 -153
  9. package/css/blades.min.css +145 -0
  10. package/css/blades.standalone.css +197 -222
  11. package/css/blades.standalone.min.css +37 -0
  12. package/css/{blades.ninja.css → ninja.css} +7 -2
  13. package/css/ninja.min.css +5 -0
  14. package/css/pico.conditional.css +3189 -0
  15. package/css/pico.conditional.min.css +107 -0
  16. package/css/pico.css +3186 -0
  17. package/css/pico.min.css +105 -0
  18. package/css/postcss.config.js +23 -0
  19. package/index.html +63 -0
  20. package/package.json +27 -11
  21. package/src/blades.css +4 -3
  22. package/src/blades.standalone.css +2 -2
  23. package/src/{blades.ninja.css → ninja.css} +7 -2
  24. package/src/pico/_components.css +974 -0
  25. package/src/pico/_content.css +608 -0
  26. package/src/pico/_forms.css +747 -0
  27. package/src/pico/_index.css +12 -0
  28. package/src/pico/_layout.css +128 -0
  29. package/src/pico/_utilities.css +53 -0
  30. package/src/pico/_variables.css +671 -0
  31. package/src/pico.css +1 -0
  32. package/src/standalone/_core.css +32 -0
  33. package/src/{blades.standalone.theme.css → standalone/_theme.css} +2 -2
  34. package/src/{_utilities.css → standalone/_utilities.css} +1 -1
  35. package/src/standalone/_variables.css +20 -0
  36. package/src/{link-icon.css → standalone/components/_icon-helper.css} +0 -2
  37. package/src/{components → standalone/components}/_timeline.css +1 -1
  38. package/src/{content → standalone/content}/_code.css +6 -5
  39. package/src/{content/_typography.css → standalone/content/_list.css} +4 -42
  40. package/src/standalone/content/_typography.css +38 -0
  41. package/src/{float-label.core.css → standalone/forms/_float-label.core.css} +12 -4
  42. package/src/standalone/forms/_float-label.css +2 -0
  43. package/src/{breakout.css → standalone/layout/_breakout.css} +3 -6
  44. package/src/{_layout.css → standalone/layout/_columns.css} +2 -12
  45. package/src/standalone/layout/_scroller.css +10 -0
  46. package/_config.yml +0 -5
  47. package/blades.gemspec +0 -16
  48. package/css/blades.standalone.core.css +0 -712
  49. package/css/blades.standalone.theme.css +0 -143
  50. package/css/breakout.css +0 -125
  51. package/css/float-label.core.css +0 -56
  52. package/css/float-label.css +0 -96
  53. package/css/float-label.theme.css +0 -39
  54. package/css/link-icon.css +0 -59
  55. package/css/responsive-table.css +0 -57
  56. package/src/blades.standalone.core.css +0 -23
  57. package/src/float-label.css +0 -3
  58. /package/src/{responsive-table.css → standalone/content/_table-responsive.css} +0 -0
  59. /package/src/{content → standalone/content}/_table.css +0 -0
  60. /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 "./float-label.theme";
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
- [data-jump-to="top"] {
102
+ [href="#top"] {
103
103
  opacity: 25%;
104
104
  &:hover {
105
105
  opacity: 75%;
@@ -1,6 +1,6 @@
1
1
  /*<!--section:docs-->
2
2
 
3
- ## Auto-dark
3
+ ## Dark auto
4
4
 
5
5
  `.dark-auto` automatically creates a simple dark version of any element:
6
6
 
@@ -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,6 +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
  }
@@ -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
- ./css/
7
- ├── blades.core.css # reusable class-light utilities, unthemed
8
- ├── blades.theme.css # minimal opinionated theme
9
- └── 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)
10
11
  ```
11
12
 
12
13
  <!--section:code-->
@@ -1,44 +1,6 @@
1
- /*<!--section:h-anchor-->
1
+ /*<!--section:docs-->
2
2
 
3
- Links with `href="#..."` inside headings are automatically displayed as anchors:
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
- ### Markerless
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
- ### Unlist
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
- /* Sources 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)
7
11
 
8
12
  ```css */
9
- 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
+ ),
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
- <!--section-->*/
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,4 +1,4 @@
1
- /*<!--section:columns-->
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
- How it works:
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
- }
@@ -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.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