@refrakt-md/lumina 0.31.0 → 0.32.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/lumina",
3
3
  "description": "Lumina theme for refrakt.md — design tokens, CSS, identity transform, and layout configs",
4
- "version": "0.31.0",
4
+ "version": "0.32.0",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -86,10 +86,10 @@
86
86
  "generate-tokens": "node scripts/generate-tokens.mjs"
87
87
  },
88
88
  "dependencies": {
89
- "@refrakt-md/runes": "0.31.0",
90
- "@refrakt-md/skeleton": "0.31.0",
91
- "@refrakt-md/transform": "0.31.0",
92
- "@refrakt-md/types": "0.31.0"
89
+ "@refrakt-md/runes": "0.32.0",
90
+ "@refrakt-md/skeleton": "0.32.0",
91
+ "@refrakt-md/transform": "0.32.0",
92
+ "@refrakt-md/types": "0.32.0"
93
93
  },
94
94
  "devDependencies": {
95
95
  "postcss": "^8.4.0"
@@ -38,6 +38,15 @@
38
38
  --rf-title-size: var(--rf-text);
39
39
  }
40
40
 
41
+ /* Every rune root clears the prominence override so an ancestor's `prominence=`
42
+ * cannot leak into a nested rune's title — the same protection the density
43
+ * declarations above already give --rf-title-size. Declared here because this
44
+ * file is imported before dimensions/surfaces.css, so a rune carrying both
45
+ * `data-density` and `data-prominence` still keeps its own. */
46
+ [data-density] {
47
+ --rf-prominence-size: initial;
48
+ }
49
+
41
50
  [data-density="minimal"] [data-section="description"] {
42
51
  display: none;
43
52
  }
@@ -18,12 +18,16 @@
18
18
  }
19
19
 
20
20
  /* ─── Title: primary heading ──────────────────────────────────────── */
21
- /* The size rides --rf-title-size (set per density root in density.css) so a
22
- * nested rune's own density re-declares it, and a rune's own title CSS
23
- * (e.g. .rf-hero__headline) outranks the bare attribute selector. */
21
+ /* Two inputs, in priority order:
22
+ * --rf-prominence-size an explicit author `prominence=` (surfaces.css)
23
+ * --rf-title-size the resting size for this density (density.css)
24
+ * They were one variable until v0.32.0, which meant a rune could not state its
25
+ * own resting size without also clobbering the author's override — the reason
26
+ * `prominence` was inert on eight runes (WORK-538). Splitting them lets a rune
27
+ * pin its default while `prominence` still wins. */
24
28
  [data-section="title"] {
25
29
  font-family: var(--rf-font-sans);
26
- font-size: var(--rf-title-size, var(--rf-text-2xl));
30
+ font-size: var(--rf-prominence-size, var(--rf-title-size, var(--rf-text-2xl)));
27
31
  font-weight: var(--rf-weight-bold);
28
32
  line-height: var(--rf-leading-tight);
29
33
  color: var(--rf-color-text);
@@ -85,17 +85,32 @@
85
85
  /* ─── Prominence: page-section-header type register ───────────────────
86
86
  * `data-prominence` re-points the section title size for page-section-header
87
87
  * family runes (the engine only emits it where a header role exists). `normal`
88
- * is the density default; the other steps layer on top, cascading down to
89
- * [data-section="title"] via --rf-title-size — the same mechanism density uses,
90
- * so a nested rune's own density/prominence re-declares it. */
88
+ * is the rune's resting size; the other steps ramp away from it, cascading down
89
+ * to [data-section="title"] via --rf-prominence-size.
90
+ *
91
+ * **The ramp is relative, not an absolute type scale** (v0.32.0, WORK-538).
92
+ * The steps used to be fixed sizes — xl / 3xl / 4xl — which only reads as a
93
+ * register when the rune's resting size happens to be the density default. On a
94
+ * hero, whose headline rests above the whole scale, `display` made the title
95
+ * *smaller*; on a bento cell, which rests below it, `quiet` made it *larger*.
96
+ * The multipliers below are the ratios those fixed steps had to the 2xl resting
97
+ * size, so every rune resting at the density default keeps its exact numbers
98
+ * (1.5rem → 20 / 24 / 30 / 40px) while a rune that states its own resting size
99
+ * ramps around that instead.
100
+ *
101
+ * Published as --rf-prominence-size rather than by overwriting --rf-title-size,
102
+ * so a rune can state a resting size without also silencing the author's
103
+ * override. density.css clears the variable at every rune root, before these
104
+ * rules, so an ancestor's prominence cannot leak into a nested rune's title
105
+ * while a rune carrying both still keeps its own. */
91
106
  [data-prominence="quiet"] {
92
- --rf-title-size: var(--rf-text-xl);
107
+ --rf-prominence-size: calc(var(--rf-title-size, var(--rf-text-2xl)) * 5 / 6);
93
108
  }
94
109
  [data-prominence="prominent"] {
95
- --rf-title-size: var(--rf-text-3xl);
110
+ --rf-prominence-size: calc(var(--rf-title-size, var(--rf-text-2xl)) * 5 / 4);
96
111
  }
97
112
  [data-prominence="display"] {
98
- --rf-title-size: var(--rf-text-4xl);
113
+ --rf-prominence-size: calc(var(--rf-title-size, var(--rf-text-2xl)) * 5 / 3);
99
114
  }
100
115
 
101
116
  /* ─── Media slot shares the surface chrome ───────────────────────────
@@ -15,6 +15,7 @@
15
15
  background: var(--rf-color-surface);
16
16
  }
17
17
  .rf-bento-cell {
18
+ --rf-title-size: var(--rf-text-lg);
18
19
  border-radius: var(--rf-radius-container);
19
20
  /* Thin-edge inset model: the cell hugs its media with a thin edge; the content
20
21
  * zone adds the remaining inset back (below). */
@@ -45,7 +46,10 @@
45
46
  padding: calc(var(--container-padding) - var(--bento-cell-edge));
46
47
  }
47
48
  .rf-bento-cell__title {
48
- font-size: var(--rf-text-lg);
49
+ /* WORK-538 — read the prominence override first; the fallback is this rune's
50
+ * resting size, stated as --rf-title-size on the root so the prominence ramp
51
+ * can compute from it. */
52
+ font-size: var(--rf-prominence-size, var(--rf-title-size));
49
53
  font-weight: var(--rf-weight-semibold);
50
54
  margin: 0 0 0.5rem;
51
55
  }
@@ -1,13 +1,17 @@
1
1
  @layer skin {
2
2
  /* Blog — post listing with filtering and sorting */
3
3
  .rf-blog {
4
+ --rf-title-size: var(--rf-text-3xl);
4
5
  padding: 2rem 0;
5
6
  }
6
7
  .rf-blog__preamble {
7
8
  margin-bottom: 2rem;
8
9
  }
9
10
  .rf-blog__headline {
10
- font-size: var(--rf-text-3xl);
11
+ /* WORK-538 — read the prominence override first; the fallback is this rune's
12
+ * resting size, stated as --rf-title-size on the root so the prominence ramp
13
+ * can compute from it. */
14
+ font-size: var(--rf-prominence-size, var(--rf-title-size));
11
15
  font-weight: var(--rf-weight-bold);
12
16
  letter-spacing: var(--rf-tracking-tight);
13
17
  margin: 0 0 0.5rem;
@@ -2,6 +2,7 @@
2
2
  /* Call to Action — skin. The preamble/eyebrow/button-row layout + mobile stack
3
3
  * live in @refrakt-md/skeleton (styles/runes/cta.css). */
4
4
  .rf-cta {
5
+ --rf-title-size: var(--rf-text-4xl);
5
6
  padding: 3.5rem 2rem 3rem;
6
7
  }
7
8
  .rf-cta .rf-cta__preamble,
@@ -52,7 +53,10 @@
52
53
  .rf-cta h2,
53
54
  .rf-cta h3,
54
55
  .rf-cta__headline {
55
- font-size: var(--rf-text-4xl);
56
+ /* WORK-538 — read the prominence override first; the fallback is this rune's
57
+ * resting size, stated as --rf-title-size on the root so the prominence ramp
58
+ * can compute from it. */
59
+ font-size: var(--rf-prominence-size, var(--rf-title-size));
56
60
  font-weight: var(--rf-weight-bold);
57
61
  letter-spacing: var(--rf-tracking-tight);
58
62
  margin-bottom: 0.75rem;
@@ -1,7 +1,17 @@
1
1
  @layer skin {
2
+
3
+ /* WORK-538 — resting title size, so the prominence ramp computes from it
4
+ * rather than from the density default. */
5
+ .rf-design-context {
6
+ --rf-title-size: var(--rf-text-xl);
7
+ }
8
+
2
9
  /* Design Context — unified token card wrapper */
3
10
  .rf-design-context__title {
4
- font-size: var(--rf-text-xl);
11
+ /* WORK-538 — read the prominence override first; the fallback is this rune's
12
+ * resting size, stated as --rf-title-size on the root so the prominence ramp
13
+ * can compute from it. */
14
+ font-size: var(--rf-prominence-size, var(--rf-title-size));
5
15
  font-weight: var(--rf-weight-bold);
6
16
  margin-bottom: 1rem;
7
17
  }
@@ -5,7 +5,12 @@
5
5
  * @refrakt-md/skeleton (styles/runes/hero.css). What remains here is skin:
6
6
  * spacing, type, the headline gradient, surface chrome, the scrim, radii, and
7
7
  * text-align. */
8
+ /* The hero rests above the --rf-text scale's top step (4xl = 2.5rem); stated
9
+ * here rather than promoted to a --rf-text-5xl token, because the type scale is
10
+ * a typed contract every theme must satisfy (SPEC-048) and one rune's one-off
11
+ * does not belong in it. The prominence ramp scales around this value. */
8
12
  .rf-hero {
13
+ --rf-title-size: 3.25rem;
9
14
  padding: 7rem 2rem 6.5rem;
10
15
  background-size: cover;
11
16
  background-position: center;
@@ -80,8 +85,10 @@
80
85
  }
81
86
  .rf-hero h1,
82
87
  .rf-hero__headline {
83
- /* Hero display headline — a one-off above the --rf-text scale's top step. */
84
- font-size: 3.25rem;
88
+ /* WORK-538 — read the prominence override first; the fallback is this rune's
89
+ * resting size, stated as --rf-title-size on the root so the prominence ramp
90
+ * can compute from it. */
91
+ font-size: var(--rf-prominence-size, var(--rf-title-size));
85
92
  font-weight: var(--rf-weight-bold);
86
93
  letter-spacing: var(--rf-tracking-tight);
87
94
  line-height: var(--rf-leading-tight);
@@ -1,7 +1,17 @@
1
1
  @layer skin {
2
+
3
+ /* WORK-538 — resting title size, so the prominence ramp computes from it
4
+ * rather than from the density default. */
5
+ .rf-palette {
6
+ --rf-title-size: var(--rf-text-lg);
7
+ }
8
+
2
9
  /* Palette — color swatch grid */
3
10
  .rf-palette__title {
4
- font-size: var(--rf-text-lg);
11
+ /* WORK-538 — read the prominence override first; the fallback is this rune's
12
+ * resting size, stated as --rf-title-size on the root so the prominence ramp
13
+ * can compute from it. */
14
+ font-size: var(--rf-prominence-size, var(--rf-title-size));
5
15
  font-weight: var(--rf-weight-semibold);
6
16
  margin-bottom: 1rem;
7
17
  }
@@ -1,7 +1,17 @@
1
1
  @layer skin {
2
+
3
+ /* WORK-538 — resting title size, so the prominence ramp computes from it
4
+ * rather than from the density default. */
5
+ .rf-spacing {
6
+ --rf-title-size: var(--rf-text-lg);
7
+ }
8
+
2
9
  /* Spacing — spacing scale, radii, and shadow display */
3
10
  .rf-spacing__title {
4
- font-size: var(--rf-text-lg);
11
+ /* WORK-538 — read the prominence override first; the fallback is this rune's
12
+ * resting size, stated as --rf-title-size on the root so the prominence ramp
13
+ * can compute from it. */
14
+ font-size: var(--rf-prominence-size, var(--rf-title-size));
5
15
  font-weight: var(--rf-weight-semibold);
6
16
  margin-bottom: 1rem;
7
17
  }
@@ -1,7 +1,17 @@
1
1
  @layer skin {
2
+
3
+ /* WORK-538 — resting title size, so the prominence ramp computes from it
4
+ * rather than from the density default. */
5
+ .rf-typography {
6
+ --rf-title-size: var(--rf-text-lg);
7
+ }
8
+
2
9
  /* Typography — font specimen display */
3
10
  .rf-typography__title {
4
- font-size: var(--rf-text-lg);
11
+ /* WORK-538 — read the prominence override first; the fallback is this rune's
12
+ * resting size, stated as --rf-title-size on the root so the prominence ramp
13
+ * can compute from it. */
14
+ font-size: var(--rf-prominence-size, var(--rf-title-size));
5
15
  font-weight: var(--rf-weight-semibold);
6
16
  margin-bottom: 1rem;
7
17
  }