@anyblades/blades 2.2.4 → 2.3.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.
@@ -46,8 +46,8 @@ How it works:
46
46
 
47
47
  [data-jump-to="top"] {
48
48
  position: fixed;
49
- bottom: 0;
50
49
  right: 0;
50
+ bottom: 0;
51
51
  padding-top: 50vh;
52
52
  }
53
53
 
@@ -60,17 +60,17 @@ How it works:
60
60
 
61
61
  .breakout,
62
62
  .breakout-all {
63
+ max-width: calc(10% + 65ch + 10%);
63
64
  /* Prepare the container for breakout elements */
64
65
  padding-inline: 10%;
65
- max-width: calc(10% + 65ch + 10%);
66
66
  }
67
67
 
68
68
  @media (width < 768px) {
69
69
 
70
70
  .breakout,
71
71
  .breakout-all {
72
- padding-inline: 1rem;
73
- max-width: calc(1rem + 65ch + 1rem)
72
+ max-width: calc(1rem + 65ch + 1rem);
73
+ padding-inline: 1rem
74
74
  }
75
75
  }
76
76
 
@@ -119,19 +119,19 @@ How it works:
119
119
  }
120
120
 
121
121
  .breakout-all > *:is(h2, h3, h4, h5, h6, hr):not([class])::before {
122
- content: "";
123
122
  display: block;
124
123
  position: absolute;
125
124
  background: gray;
125
+ content: "";
126
126
  opacity: 12.5%;
127
127
  }
128
128
 
129
129
  .breakout-all > *:is(h2, h3, h4, h5, h6):not([class])::before {
130
- width: 10em;
130
+ top: 50%;
131
131
  right: 100%;
132
- margin-right: 0.8ch;
132
+ width: 10em;
133
133
  height: 0.25em;
134
- top: 50%;
134
+ margin-right: 0.8ch;
135
135
  transform: translateY(-50%);
136
136
  background: linear-gradient(to left, gray, transparent);
137
137
  }
@@ -144,13 +144,13 @@ How it works:
144
144
 
145
145
  .breakout-all > *:is(hr) {
146
146
  height: 0.5rem;
147
- border: none;
148
147
  overflow: visible;
148
+ border: none;
149
149
  }
150
150
 
151
151
  .breakout-all > *:is(hr)::before {
152
- width: 100dvw;
153
152
  left: 50%;
153
+ width: 100dvw;
154
154
  height: 100%;
155
155
  transform: translateX(-50%);
156
156
  }
@@ -223,14 +223,14 @@ h6 {
223
223
  }
224
224
 
225
225
  h1 a[aria-hidden="true"], h2 a[aria-hidden="true"], h3 a[aria-hidden="true"], h4 a[aria-hidden="true"], h5 a[aria-hidden="true"], h6 a[aria-hidden="true"] {
226
+ visibility: hidden;
226
227
  position: absolute;
227
- right: 100%;
228
228
  top: 50%;
229
- transform: translateY(-50%);
229
+ right: 100%;
230
230
  padding-right: 0.2ch;
231
+ transform: translateY(-50%);
231
232
  color: silver;
232
233
  text-decoration: none;
233
- visibility: hidden;
234
234
  }
235
235
 
236
236
  @media /* to avoid double-tap on touch devices */ (hover: hover) {
@@ -351,24 +351,24 @@ ul.unlist > li, ul.unlist-all > li, .unlist-all ul > li, ol.unlist > li, ol.unli
351
351
 
352
352
  a:has(> i) {
353
353
  display: inline-flex;
354
+ overflow-y: clip; /* to work in pair with text-underline-offset in Safari */
354
355
  gap: 0.375ch; /* =3/8 */
355
356
  text-wrap: balance;
356
- overflow-y: clip; /* to work in pair with text-underline-offset in Safari */
357
357
  }
358
358
 
359
359
  a > i {
360
- font-style: normal;
361
360
  float: left; /* ✅ Chrome ❌ Safari */
361
+ font-style: normal;
362
362
  text-underline-offset: -2em; /* ❌ Chrome ✅ Safari - to clip it with overflow-y */
363
363
  }
364
364
 
365
365
  /* Favicons */
366
366
 
367
367
  a > i > img {
368
+ display: inline-block; /* for Tailwind CSS Typography */
369
+ max-width: none; /* to keep ratio safe */
368
370
  height: 1.25em;
369
371
  margin-block-start: calc(-0.25em / 2);
370
- max-width: none; /* to keep ratio safe */
371
- display: inline-block; /* for Tailwind CSS Typography */
372
372
  }
373
373
 
374
374
  a > i[class^="fa-"],
@@ -436,10 +436,10 @@ How it works:
436
436
  ```css */
437
437
 
438
438
  th hr {
439
+ visibility: hidden;
439
440
  width: 12ch; /* min ~65/12 = ~5 cols */
440
441
  height: 0;
441
442
  margin: 0;
442
- visibility: hidden;
443
443
  }
444
444
 
445
445
  th hr.lg {
@@ -481,20 +481,20 @@ table.borderless th,
481
481
  table.responsive,
482
482
  .breakout > table:not(.does-not-exist),
483
483
  .breakout-all > table:not(.does-not-exist) {
484
- /* Center horizontally */
485
- margin-left: 50%;
486
- transform: translateX(-50%);
484
+
485
+ /* Let them scroll */
486
+ display: block;
487
487
 
488
488
  /* Let them full-bleed */
489
489
  width: -moz-max-content;
490
490
  width: max-content;
491
491
  min-width: auto;
492
492
  max-width: 100dvw;
493
+ /* Center horizontally */
494
+ margin-left: 50%;
493
495
  padding-inline: 7.5%;
494
-
495
- /* Let them scroll */
496
- display: block;
497
496
  overflow-x: auto;
497
+ transform: translateX(-50%);
498
498
  -webkit-overflow-scrolling: touch; /* Smooth scroll for iOS */
499
499
  }
500
500
 
@@ -543,7 +543,7 @@ Living examples: \3c !--A-Z-->
543
543
  The `<pre><code>` blocks are Prism-compatible and support captions via `data-caption="..."` attribute:
544
544
 
545
545
  ```treeview {data-caption="Blades CSS:"}
546
- ./assets/
546
+ ./css/
547
547
  ├── blades.core.css # reusable class-light utilities, unthemed
548
548
  ├── blades.theme.css # minimal opinionated theme
549
549
  └── blades.css # above two together
@@ -566,11 +566,11 @@ pre {
566
566
  /* Code block caption via data-attr (to display filename, etc.) */
567
567
 
568
568
  code[data-caption]::before {
569
- content: attr(data-caption);
570
569
  display: block;
571
570
  margin-bottom: 1rem;
572
- opacity: 50%;
571
+ content: attr(data-caption);
573
572
  font-style: italic;
573
+ opacity: 50%;
574
574
  }
575
575
 
576
576
  code:where(pre > *) {
@@ -606,10 +606,10 @@ label:has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea
606
606
  .has-float-label > span,
607
607
  .has-float-label label {
608
608
  position: absolute;
609
- left: 0;
610
609
  top: 0;
611
- cursor: text;
610
+ left: 0;
612
611
  font-size: 75%;
612
+ cursor: text;
613
613
  }
614
614
 
615
615
  /*
@@ -46,8 +46,8 @@ How it works:
46
46
 
47
47
  [data-jump-to="top"] {
48
48
  position: fixed;
49
- bottom: 0;
50
49
  right: 0;
50
+ bottom: 0;
51
51
  padding-top: 50vh;
52
52
  }
53
53
 
@@ -60,17 +60,17 @@ How it works:
60
60
 
61
61
  .breakout,
62
62
  .breakout-all {
63
+ max-width: calc(10% + 65ch + 10%);
63
64
  /* Prepare the container for breakout elements */
64
65
  padding-inline: 10%;
65
- max-width: calc(10% + 65ch + 10%);
66
66
  }
67
67
 
68
68
  @media (width < 768px) {
69
69
 
70
70
  .breakout,
71
71
  .breakout-all {
72
- padding-inline: 1rem;
73
- max-width: calc(1rem + 65ch + 1rem)
72
+ max-width: calc(1rem + 65ch + 1rem);
73
+ padding-inline: 1rem
74
74
  }
75
75
  }
76
76
 
@@ -119,19 +119,19 @@ How it works:
119
119
  }
120
120
 
121
121
  .breakout-all > *:is(h2, h3, h4, h5, h6, hr):not([class])::before {
122
- content: "";
123
122
  display: block;
124
123
  position: absolute;
125
124
  background: gray;
125
+ content: "";
126
126
  opacity: 12.5%;
127
127
  }
128
128
 
129
129
  .breakout-all > *:is(h2, h3, h4, h5, h6):not([class])::before {
130
- width: 10em;
130
+ top: 50%;
131
131
  right: 100%;
132
- margin-right: 0.8ch;
132
+ width: 10em;
133
133
  height: 0.25em;
134
- top: 50%;
134
+ margin-right: 0.8ch;
135
135
  transform: translateY(-50%);
136
136
  background: linear-gradient(to left, gray, transparent);
137
137
  }
@@ -144,13 +144,13 @@ How it works:
144
144
 
145
145
  .breakout-all > *:is(hr) {
146
146
  height: 0.5rem;
147
- border: none;
148
147
  overflow: visible;
148
+ border: none;
149
149
  }
150
150
 
151
151
  .breakout-all > *:is(hr)::before {
152
- width: 100dvw;
153
152
  left: 50%;
153
+ width: 100dvw;
154
154
  height: 100%;
155
155
  transform: translateX(-50%);
156
156
  }
@@ -223,14 +223,14 @@ h6 {
223
223
  }
224
224
 
225
225
  h1 a[aria-hidden="true"], h2 a[aria-hidden="true"], h3 a[aria-hidden="true"], h4 a[aria-hidden="true"], h5 a[aria-hidden="true"], h6 a[aria-hidden="true"] {
226
+ visibility: hidden;
226
227
  position: absolute;
227
- right: 100%;
228
228
  top: 50%;
229
- transform: translateY(-50%);
229
+ right: 100%;
230
230
  padding-right: 0.2ch;
231
+ transform: translateY(-50%);
231
232
  color: silver;
232
233
  text-decoration: none;
233
- visibility: hidden;
234
234
  }
235
235
 
236
236
  @media /* to avoid double-tap on touch devices */ (hover: hover) {
@@ -351,24 +351,24 @@ ul.unlist > li, ul.unlist-all > li, .unlist-all ul > li, ol.unlist > li, ol.unli
351
351
 
352
352
  a:has(> i) {
353
353
  display: inline-flex;
354
+ overflow-y: clip; /* to work in pair with text-underline-offset in Safari */
354
355
  gap: 0.375ch; /* =3/8 */
355
356
  text-wrap: balance;
356
- overflow-y: clip; /* to work in pair with text-underline-offset in Safari */
357
357
  }
358
358
 
359
359
  a > i {
360
- font-style: normal;
361
360
  float: left; /* ✅ Chrome ❌ Safari */
361
+ font-style: normal;
362
362
  text-underline-offset: -2em; /* ❌ Chrome ✅ Safari - to clip it with overflow-y */
363
363
  }
364
364
 
365
365
  /* Favicons */
366
366
 
367
367
  a > i > img {
368
+ display: inline-block; /* for Tailwind CSS Typography */
369
+ max-width: none; /* to keep ratio safe */
368
370
  height: 1.25em;
369
371
  margin-block-start: calc(-0.25em / 2);
370
- max-width: none; /* to keep ratio safe */
371
- display: inline-block; /* for Tailwind CSS Typography */
372
372
  }
373
373
 
374
374
  a > i[class^="fa-"],
@@ -436,10 +436,10 @@ How it works:
436
436
  ```css */
437
437
 
438
438
  th hr {
439
+ visibility: hidden;
439
440
  width: 12ch; /* min ~65/12 = ~5 cols */
440
441
  height: 0;
441
442
  margin: 0;
442
- visibility: hidden;
443
443
  }
444
444
 
445
445
  th hr.lg {
@@ -481,20 +481,20 @@ table.borderless th,
481
481
  table.responsive,
482
482
  .breakout > table:not(.does-not-exist),
483
483
  .breakout-all > table:not(.does-not-exist) {
484
- /* Center horizontally */
485
- margin-left: 50%;
486
- transform: translateX(-50%);
484
+
485
+ /* Let them scroll */
486
+ display: block;
487
487
 
488
488
  /* Let them full-bleed */
489
489
  width: -moz-max-content;
490
490
  width: max-content;
491
491
  min-width: auto;
492
492
  max-width: 100dvw;
493
+ /* Center horizontally */
494
+ margin-left: 50%;
493
495
  padding-inline: 7.5%;
494
-
495
- /* Let them scroll */
496
- display: block;
497
496
  overflow-x: auto;
497
+ transform: translateX(-50%);
498
498
  -webkit-overflow-scrolling: touch; /* Smooth scroll for iOS */
499
499
  }
500
500
 
@@ -543,7 +543,7 @@ Living examples: \3c !--A-Z-->
543
543
  The `<pre><code>` blocks are Prism-compatible and support captions via `data-caption="..."` attribute:
544
544
 
545
545
  ```treeview {data-caption="Blades CSS:"}
546
- ./assets/
546
+ ./css/
547
547
  ├── blades.core.css # reusable class-light utilities, unthemed
548
548
  ├── blades.theme.css # minimal opinionated theme
549
549
  └── blades.css # above two together
@@ -566,11 +566,11 @@ pre {
566
566
  /* Code block caption via data-attr (to display filename, etc.) */
567
567
 
568
568
  code[data-caption]::before {
569
- content: attr(data-caption);
570
569
  display: block;
571
570
  margin-bottom: 1rem;
572
- opacity: 50%;
571
+ content: attr(data-caption);
573
572
  font-style: italic;
573
+ opacity: 50%;
574
574
  }
575
575
 
576
576
  code:where(pre > *) {
@@ -606,10 +606,10 @@ label:has(input:not([type="checkbox"], [type="radio"], [type="range"]), textarea
606
606
  .has-float-label > span,
607
607
  .has-float-label label {
608
608
  position: absolute;
609
- left: 0;
610
609
  top: 0;
611
- cursor: text;
610
+ left: 0;
612
611
  font-size: 75%;
612
+ cursor: text;
613
613
  }
614
614
 
615
615
  /*
@@ -780,12 +780,12 @@ html {
780
780
  }
781
781
 
782
782
  body {
783
- /* Ensure `body` takes at least the full height of the viewport (using dynamic viewport height for better mobile support). */
784
- min-height: 100dvh;
785
783
 
786
784
  /* Make the `body` a flex container with column layout, and `main` to automatically fill available space. This is useful for creating sticky footers and full-height layouts. */
787
785
  display: flex;
788
786
  flex-direction: column;
787
+ /* Ensure `body` takes at least the full height of the viewport (using dynamic viewport height for better mobile support). */
788
+ min-height: 100dvh;
789
789
 
790
790
  /* Evaluates the last ~4 lines of text blocks to prevent a single word from sitting on the final line. */
791
791
 
@@ -798,8 +798,8 @@ body > main {
798
798
  }
799
799
 
800
800
  body {
801
- text-wrap: pretty;
802
801
  hyphens: auto;
802
+ text-wrap: pretty;
803
803
  }
804
804
 
805
805
  body a,
@@ -816,8 +816,8 @@ a:not([href^="#"]):hover {
816
816
  }
817
817
 
818
818
  h1 {
819
- font-size: 2.5em; /* for pico.css & tw-typography */
820
819
  margin-bottom: 1rem; /* for tw-typography */
820
+ font-size: 2.5em; /* for pico.css & tw-typography */
821
821
  }
822
822
 
823
823
  hr {
@@ -829,13 +829,13 @@ ul ul {
829
829
  }
830
830
 
831
831
  pre small {
832
- opacity: 75%;
833
832
  font-weight: lighter;
833
+ opacity: 75%;
834
834
  }
835
835
 
836
836
  table th {
837
- vertical-align: bottom;
838
837
  font-weight: bold;
838
+ vertical-align: bottom;
839
839
  }
840
840
 
841
841
  table td {
@@ -856,11 +856,11 @@ table pre {
856
856
 
857
857
  [data-jump-to="top"] > i {
858
858
  display: inline-block;
859
- padding: 0.25rem 0.375rem;
860
859
  margin: 0.5rem;
861
- font-size: 0.75rem;
862
- color: black;
860
+ padding: 0.25rem 0.375rem;
863
861
  border-color: black;
862
+ color: black;
863
+ font-size: 0.75rem;
864
864
  }
865
865
 
866
866
  .breakout > img,
@@ -3,15 +3,15 @@
3
3
  ```css */
4
4
  .breakout,
5
5
  .breakout-all {
6
+ max-width: calc(10% + 65ch + 10%);
6
7
  /* Prepare the container for breakout elements */
7
8
  padding-inline: 10%;
8
- max-width: calc(10% + 65ch + 10%);
9
9
  }
10
10
  @media (width < 768px) {
11
11
  .breakout,
12
12
  .breakout-all {
13
- padding-inline: 1rem;
14
- max-width: calc(1rem + 65ch + 1rem)
13
+ max-width: calc(1rem + 65ch + 1rem);
14
+ padding-inline: 1rem
15
15
  }
16
16
  }
17
17
  /* Breakout direct children only */
@@ -52,18 +52,18 @@
52
52
  position: relative;
53
53
  }
54
54
  .breakout-all > *:is(h2, h3, h4, h5, h6, hr):not([class])::before {
55
- content: "";
56
55
  display: block;
57
56
  position: absolute;
58
57
  background: gray;
58
+ content: "";
59
59
  opacity: 12.5%;
60
60
  }
61
61
  .breakout-all > *:is(h2, h3, h4, h5, h6):not([class])::before {
62
- width: 10em;
62
+ top: 50%;
63
63
  right: 100%;
64
- margin-right: 0.8ch;
64
+ width: 10em;
65
65
  height: 0.25em;
66
- top: 50%;
66
+ margin-right: 0.8ch;
67
67
  transform: translateY(-50%);
68
68
  background: linear-gradient(to left, gray, transparent);
69
69
  }
@@ -73,12 +73,12 @@
73
73
  }
74
74
  .breakout-all > *:is(hr) {
75
75
  height: 0.5rem;
76
- border: none;
77
76
  overflow: visible;
77
+ border: none;
78
78
  }
79
79
  .breakout-all > *:is(hr)::before {
80
- width: 100dvw;
81
80
  left: 50%;
81
+ width: 100dvw;
82
82
  height: 100%;
83
83
  transform: translateX(-50%);
84
84
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@anyblades/blades",
3
- "version": "2.2.4",
4
- "description": "Framework-agnostic CSS utilities and single-file Liquid 'blades' for modern web development.",
3
+ "version": "2.3.1",
4
+ "description": "Fully compatible and actively maintained successor to Pico CSS.",
5
5
  "exports": {
6
6
  ".": "./src/blades.standalone.css",
7
7
  "./core": "./src/blades.standalone.core.css",
@@ -9,7 +9,7 @@
9
9
  "./float-label": "./src/float-label.css"
10
10
  },
11
11
  "scripts": {
12
- "postcss": "postcss './src/!(_)*.css' --dir ./assets",
12
+ "postcss": "postcss './src/!(_)*.css' --dir ./css/",
13
13
  "build": "npm run postcss -- --no-map",
14
14
  "start": "npm run postcss -- --watch",
15
15
  "prepublishOnly": "npm run build"
@@ -28,8 +28,9 @@
28
28
  "author": "Anton Staroverov",
29
29
  "license": "MIT",
30
30
  "devDependencies": {
31
- "@anyblades/pico": "^2.2.0-alpha.6",
31
+ "@anyblades/pico": "^2.3.0",
32
32
  "autoprefixer": "^10.5.0",
33
+ "css-declaration-sorter": "^7.4.0",
33
34
  "postcss": "^8.4.33",
34
35
  "postcss-cli": "^11.0.0",
35
36
  "postcss-import": "^16.1.1",
@@ -6,7 +6,7 @@
6
6
  The `<pre><code>` blocks are Prism-compatible and support captions via `data-caption="..."` attribute:
7
7
 
8
8
  ```treeview {data-caption="Blades CSS:"}
9
- ./assets/
9
+ ./css/
10
10
  ├── blades.core.css # reusable class-light utilities, unthemed
11
11
  ├── blades.theme.css # minimal opinionated theme
12
12
  └── blades.css # above two together