@refrakt-md/skeleton 0.43.0 → 0.44.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@refrakt-md/skeleton",
3
3
  "description": "The structural cascade layer + layer-order contract every refrakt theme builds on — ships `@layer skeleton` and the `@layer skeleton, skin;` order declaration, plus the token-name contract",
4
- "version": "0.43.0",
4
+ "version": "0.44.0",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -29,7 +29,7 @@
29
29
  "styles"
30
30
  ],
31
31
  "dependencies": {
32
- "@refrakt-md/types": "0.43.0"
32
+ "@refrakt-md/types": "0.44.0"
33
33
  },
34
34
  "scripts": {
35
35
  "build": "tsc"
@@ -1,4 +1,4 @@
1
- /* metadata — structure. The zone-layout primitives (bar, definition-list) and the
1
+ /* metadata — structure. The zone-layout primitives (bar, definition-list, lead) and the
2
2
  * visually-hidden label mechanism. [data-zone-layout] is layout-uncontested (no
3
3
  * layout file targets it), and a rune overriding these resolves correctly (skin
4
4
  * beats skeleton). Spacing values (gap / padding / rhythm margins), borders,
@@ -26,6 +26,15 @@
26
26
  margin-left: auto;
27
27
  }
28
28
 
29
+ /* ── Layout: lead (SPEC-161 D6) ──
30
+ * A byline: the fields in a column, the lead (`data-lead`) first and the rest
31
+ * beneath it. No value is ranked, so a compact container hides none of them. */
32
+ [data-zone-layout="lead"] {
33
+ display: flex;
34
+ flex-direction: column;
35
+ align-items: flex-start;
36
+ }
37
+
29
38
  /* ── Layout: definition-list ──
30
39
  * Each row stacks dt over dd; rows flow into auto-fit columns that collapse to a
31
40
  * single column on narrow containers without a media-query step. */
@@ -15,9 +15,12 @@
15
15
  grid-template-columns: var(--media-share, 50%) 1fr;
16
16
  align-items: var(--split-valign, start);
17
17
  }
18
- /* "end" flips the grid so media lands in column 2 (source order is media-first). */
18
+ /* "end" flips the grid so media lands in column 2 (source order is media-first).
19
+ * `dense` backfills the content into row 1, column 1: placed after the media,
20
+ * it would otherwise start a second row. */
19
21
  [data-media-position="end"] {
20
22
  grid-template-columns: 1fr var(--media-share, 50%);
23
+ grid-auto-flow: dense;
21
24
  }
22
25
  [data-media-position="end"] > [data-section="media"],
23
26
  [data-media-position="end"] > [data-name="media"] {
@@ -27,6 +30,15 @@
27
30
  grid-column: 1;
28
31
  }
29
32
 
33
+ /* A portrait media zone (a round avatar) takes its portrait's width rather than
34
+ * a share of the row, unless a `media-ratio` asks for one. */
35
+ [data-media-position="start"]:not([data-media-ratio]):has(> [data-media="portrait"]) {
36
+ grid-template-columns: auto 1fr;
37
+ }
38
+ [data-media-position="end"]:not([data-media-ratio]):has(> [data-media="portrait"]) {
39
+ grid-template-columns: 1fr auto;
40
+ }
41
+
30
42
  /* `media-ratio` → media's share of the row width. */
31
43
  [data-media-ratio="1/3"] {
32
44
  --media-share: 33.333%;
@@ -37,3 +37,14 @@
37
37
  box-sizing: border-box;
38
38
  }
39
39
  }
40
+
41
+ /* Size follows the nearest enclosing rune's `prominence` (SPEC-160 D7). The skin
42
+ * sets `--action-padding` / `--action-font-size` on a `[data-prominence]` rune;
43
+ * every other rune root clears them, so they reach only an `actions` whose
44
+ * nearest enclosing rune carries the prominence. A raised card inside a display
45
+ * hero keeps default buttons — the same protection density.css gives titles.
46
+ * `actions` itself is exempt: it is what reads them. */
47
+ [data-rune]:not([data-prominence], [data-rune="actions"]) {
48
+ --action-padding: initial;
49
+ --action-font-size: initial;
50
+ }
@@ -49,3 +49,48 @@
49
49
  align-items: flex-end;
50
50
  margin-inline-start: auto;
51
51
  }
52
+
53
+ /* The section's `align` positions its own actions row too (SPEC-160 D7), whether
54
+ * it sits in the body or the content column — never an `actions` inside a
55
+ * nested rune, which has its own alignment. */
56
+ .rf-section[data-align="center"] > .rf-section__body > .rf-actions,
57
+ .rf-section[data-align="center"] > .rf-section__content > .rf-section__body > .rf-actions {
58
+ --actions-justify: center;
59
+ }
60
+ .rf-section[data-align="end"] > .rf-section__body > .rf-actions,
61
+ .rf-section[data-align="end"] > .rf-section__content > .rf-section__body > .rf-actions {
62
+ --actions-justify: flex-end;
63
+ }
64
+
65
+ /* Cover band (SPEC-160 D7). A section is a page band, not a card: in cover mode
66
+ * its height comes from its content and `height` / `aspect`, never from the
67
+ * cover layer's portrait default, and an unplaced overlay sits mid-band. These
68
+ * win over the shared cover layer (dimensions/cover.css) by specificity. */
69
+ .rf-section--cover[data-media-position="cover"] {
70
+ --cover-aspect: auto;
71
+ container-type: normal;
72
+ min-height: clamp(22rem, 55vh, 40rem);
73
+ }
74
+ .rf-section--cover[data-media-position="cover"][data-aspect] {
75
+ min-height: 0;
76
+ }
77
+ .rf-section--cover[data-media-position="cover"][data-height="sm"] {
78
+ min-height: 12rem;
79
+ }
80
+ .rf-section--cover[data-media-position="cover"][data-height="md"] {
81
+ min-height: 18rem;
82
+ }
83
+ .rf-section--cover[data-media-position="cover"][data-height="lg"] {
84
+ min-height: 26rem;
85
+ }
86
+ .rf-section--cover[data-media-position="cover"][data-height="xl"] {
87
+ min-height: 34rem;
88
+ }
89
+ .rf-section--cover[data-media-position="cover"]:is(
90
+ [data-content-place="auto"],
91
+ :not([data-content-place])
92
+ )
93
+ > [data-name="content"] {
94
+ align-self: center;
95
+ justify-self: stretch;
96
+ }