@refrakt-md/lumina 0.15.0 → 0.16.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.
- package/base.css +1 -0
- package/contracts/structures.json +71 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +11 -0
- package/dist/tokens.js.map +1 -1
- package/index.css +7 -5
- package/package.json +4 -4
- package/styles/elements/code.css +72 -0
- package/styles/layouts/docs.css +17 -0
- package/styles/layouts/split.css +53 -11
- package/styles/layouts/theme-toggle.css +67 -0
- package/styles/runes/accordion.css +56 -16
- package/styles/runes/aggregate.css +75 -0
- package/styles/runes/badge.css +20 -16
- package/styles/runes/card.css +83 -0
- package/styles/runes/codegroup.css +13 -0
- package/styles/runes/collection.css +166 -0
- package/styles/runes/conversation.css +8 -3
- package/styles/runes/diff.css +77 -9
- package/styles/runes/drawer.css +51 -6
- package/styles/runes/file-ref.css +31 -0
- package/styles/runes/nav.css +15 -0
- package/styles/runes/progress.css +49 -0
- package/styles/runes/relationships.css +132 -0
- package/tokens/base.css +14 -0
- package/styles/runes/backlog.css +0 -108
- package/styles/runes/decision-log.css +0 -46
- package/styles/runes/plan-activity.css +0 -87
- package/styles/runes/plan-entity-tabs.css +0 -88
- package/styles/runes/plan-relationships.css +0 -40
package/styles/runes/badge.css
CHANGED
|
@@ -1,33 +1,37 @@
|
|
|
1
|
-
/* Badge rune — standalone inline
|
|
1
|
+
/* Badge rune — standalone inline chip.
|
|
2
2
|
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
3
|
+
* Built atop the metadata pill base (`data-meta-type`), but reshaped to the
|
|
4
|
+
* compact chip look used by plan-progress status counts: **no border**,
|
|
5
|
+
* solid-ish sentiment-tinted background, smaller font + tighter padding, and
|
|
6
|
+
* a small corner radius. Tints come from the universal `--meta-color` set by
|
|
7
|
+
* `dimensions/metadata.css`'s sentiment rules (positive / caution / negative /
|
|
8
|
+
* neutral → success / warning / danger / muted). Background is a `color-mix`
|
|
9
|
+
* of that color, so the chip stays sentiment-flexible — any value the theme
|
|
10
|
+
* gives `--meta-color` works without per-status selectors.
|
|
10
11
|
*
|
|
11
|
-
* rank="primary" boosts emphasis with a heavier
|
|
12
|
-
*
|
|
13
|
-
* dominate over their neighbours.
|
|
12
|
+
* `rank="primary"` boosts emphasis with a heavier tint and bolder weight,
|
|
13
|
+
* useful for labels that should dominate over neighbours.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
.rf-badge {
|
|
17
17
|
vertical-align: baseline;
|
|
18
|
-
border
|
|
19
|
-
background: color-mix(in srgb, var(--meta-color,
|
|
20
|
-
color: var(--meta-color, var(--rf-color-
|
|
18
|
+
border: none;
|
|
19
|
+
background: color-mix(in srgb, var(--meta-color, var(--rf-color-muted)) 10%, transparent);
|
|
20
|
+
color: var(--meta-color, var(--rf-color-muted));
|
|
21
|
+
font-size: 0.75rem;
|
|
21
22
|
font-weight: 500;
|
|
23
|
+
padding: 0.125rem 0.5rem;
|
|
24
|
+
border-radius: var(--rf-radius-sm);
|
|
25
|
+
white-space: nowrap;
|
|
22
26
|
}
|
|
23
27
|
|
|
24
28
|
.rf-badge[data-meta-rank="primary"] {
|
|
25
|
-
background: color-mix(in srgb, var(--meta-color,
|
|
29
|
+
background: color-mix(in srgb, var(--meta-color, var(--rf-color-muted)) 28%, transparent);
|
|
26
30
|
font-weight: 600;
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
/* Drop the sentiment dot — the background tint carries the cue for
|
|
30
|
-
* standalone
|
|
34
|
+
* standalone chips, and the dot competes visually with adjacent prose. */
|
|
31
35
|
.rf-badge::before {
|
|
32
36
|
display: none;
|
|
33
37
|
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* card — generic content card (SPEC-070).
|
|
2
|
+
*
|
|
3
|
+
* Borderless (no outline) but with a soft surface fill — the surface + the
|
|
4
|
+
* structure (media split, footer separator) carry the card, no border needed.
|
|
5
|
+
* The media|content split + responsive collapse + mobile full-bleed media
|
|
6
|
+
* header come from the shared layouts/split.css (keyed off data-layout /
|
|
7
|
+
* data-section="media" / data-name="content" / data-media-position).
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
.rf-card {
|
|
11
|
+
position: relative; /* anchor for the stretched link + media bleed */
|
|
12
|
+
padding: var(--rune-padding, var(--rf-spacing-md));
|
|
13
|
+
border-radius: var(--rf-radius-md);
|
|
14
|
+
background: var(--rf-color-surface);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.rf-card:hover {
|
|
18
|
+
background: var(--rf-color-surface-hover);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.rf-card__body > :first-child { margin-top: 0; }
|
|
22
|
+
.rf-card__body > :last-child { margin-bottom: 0; }
|
|
23
|
+
|
|
24
|
+
/* Eyebrow — a leading paragraph immediately before a heading, the same kicker
|
|
25
|
+
* treatment as page-section / recipe. */
|
|
26
|
+
.rf-card__eyebrow {
|
|
27
|
+
font-size: 0.8rem;
|
|
28
|
+
font-weight: 600;
|
|
29
|
+
letter-spacing: 0.06em;
|
|
30
|
+
text-transform: uppercase;
|
|
31
|
+
color: var(--rf-color-primary);
|
|
32
|
+
margin: 0 0 0.375rem;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* The body's leading heading is the card title; drop its prose top margin so it
|
|
36
|
+
* hugs the eyebrow (or the top of the card) instead of opening a gap. */
|
|
37
|
+
.rf-card__title {
|
|
38
|
+
margin-top: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.rf-card__footer {
|
|
42
|
+
margin-top: var(--rf-spacing-sm);
|
|
43
|
+
padding-top: var(--rf-spacing-sm);
|
|
44
|
+
border-top: 1px solid var(--rf-color-border);
|
|
45
|
+
font-size: 0.8125em;
|
|
46
|
+
color: var(--rf-color-muted);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* In a collection grid, each row stretches its items to the tallest (see
|
|
50
|
+
* collection.css); these rules make a stacked card spend that height usefully:
|
|
51
|
+
* the card becomes a column, its content fills the leftover height, and the
|
|
52
|
+
* body grows so footers drop to a common baseline across the row. Scoped to
|
|
53
|
+
* stacked cards so a split card's grid (layouts/split.css) is left intact. */
|
|
54
|
+
.rf-collection[data-layout='grid'] .rf-card[data-layout='stacked'] {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
/* The grid/flex wrapper stretches the card, but a nested flex container
|
|
58
|
+
* doesn't always pass that height to its own flex children; pin it so the
|
|
59
|
+
* content/body flex:1 reliably fills. */
|
|
60
|
+
height: 100%;
|
|
61
|
+
}
|
|
62
|
+
.rf-collection[data-layout='grid'] .rf-card[data-layout='stacked'] > .rf-card__content {
|
|
63
|
+
flex: 1;
|
|
64
|
+
}
|
|
65
|
+
.rf-collection[data-layout='grid'] .rf-card[data-layout='stacked'] .rf-card__content {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
}
|
|
69
|
+
.rf-collection[data-layout='grid'] .rf-card[data-layout='stacked'] .rf-card__body {
|
|
70
|
+
flex: 1;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Whole-card stretched link — covers the card; real links in body/footer
|
|
74
|
+
* sit above it via position:relative. */
|
|
75
|
+
.rf-card__link {
|
|
76
|
+
position: absolute;
|
|
77
|
+
inset: 0;
|
|
78
|
+
z-index: 0;
|
|
79
|
+
}
|
|
80
|
+
.rf-card a:not(.rf-card__link) {
|
|
81
|
+
position: relative;
|
|
82
|
+
z-index: 1;
|
|
83
|
+
}
|
|
@@ -95,6 +95,19 @@
|
|
|
95
95
|
word-break: break-word;
|
|
96
96
|
overflow-x: hidden;
|
|
97
97
|
}
|
|
98
|
+
/* WORK-304 — the standalone codeblock CSS at `elements/code.css`
|
|
99
|
+
* sets `display: grid; min-width: max-content` on `pre code` so
|
|
100
|
+
* row tints + line numbers extend across the horizontal scroll
|
|
101
|
+
* region. That sizing actively prevents wrapping (the code track
|
|
102
|
+
* is locked at max-content). Inside `overflow="wrap"` codegroups
|
|
103
|
+
* we WANT wrapping, so revert the code element back to a plain
|
|
104
|
+
* block with no min-width constraint. Lines stay block-flow so
|
|
105
|
+
* Shiki's `<span class="line">` children wrap with the pre's
|
|
106
|
+
* `white-space: pre-wrap`. */
|
|
107
|
+
.rf-codegroup[data-overflow="wrap"] pre code {
|
|
108
|
+
display: block;
|
|
109
|
+
min-width: 0;
|
|
110
|
+
}
|
|
98
111
|
.rf-codegroup[data-overflow="hide"] pre {
|
|
99
112
|
overflow-x: hidden;
|
|
100
113
|
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/* Collection — list / grid / table / cards of registry entities (SPEC-070).
|
|
2
|
+
*
|
|
3
|
+
* The block is layout-agnostic; the `data-layout` attribute on the wrapper
|
|
4
|
+
* selects the arrangement. Built-in items carry `.rf-collection__card` /
|
|
5
|
+
* `__item`; a body template emits its own markup inside `.rf-collection__item`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.rf-collection {
|
|
9
|
+
margin: var(--rf-spacing-md) 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* Preamble — rendered above items only when the query is non-empty, so a
|
|
13
|
+
* heading/intro can live inside the rune and vanish with an empty section. */
|
|
14
|
+
.rf-collection__preamble > :first-child { margin-top: 0; }
|
|
15
|
+
|
|
16
|
+
/* Empty state — shown in place of items when the query yields nothing. */
|
|
17
|
+
.rf-collection__empty {
|
|
18
|
+
color: var(--rf-color-muted);
|
|
19
|
+
font-size: 0.9375em;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.rf-collection__items {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
gap: var(--rf-spacing-sm);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* grid arranges items into responsive columns; list stays a stacked flow.
|
|
29
|
+
* Item chrome (a card box, bare row, …) comes from the item, not the layout. */
|
|
30
|
+
.rf-collection[data-layout='grid'] .rf-collection__items {
|
|
31
|
+
display: grid;
|
|
32
|
+
grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
|
|
33
|
+
gap: var(--rf-spacing-md);
|
|
34
|
+
align-items: stretch;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Uniform heights per row: grid stretches each item to the tallest in its row;
|
|
38
|
+
* a body-template item then lets its card fill that stretched height. */
|
|
39
|
+
.rf-collection[data-layout='grid'] .rf-collection__item {
|
|
40
|
+
display: flex;
|
|
41
|
+
}
|
|
42
|
+
.rf-collection[data-layout='grid'] .rf-collection__item > * {
|
|
43
|
+
flex: 1;
|
|
44
|
+
min-width: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Grouped grid: the grid belongs to each group (its items are the cells), not
|
|
48
|
+
* to __items — whose children are the group blocks (heading groups) or the
|
|
49
|
+
* accordion wrapper. Left on __items, each group becomes a single cell, i.e. a
|
|
50
|
+
* column per group. So when __items holds groups it stacks them, and each
|
|
51
|
+
* group becomes the grid instead, with the group title spanning every column. */
|
|
52
|
+
.rf-collection[data-layout='grid'] .rf-collection__items:has(.rf-collection__group),
|
|
53
|
+
.rf-collection[data-layout='grid'] .rf-collection__items:has(.rf-accordion) {
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
gap: var(--rf-spacing-md);
|
|
57
|
+
}
|
|
58
|
+
.rf-collection[data-layout='grid'] .rf-collection__group {
|
|
59
|
+
display: grid;
|
|
60
|
+
grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
|
|
61
|
+
gap: var(--rf-spacing-md);
|
|
62
|
+
align-items: stretch;
|
|
63
|
+
}
|
|
64
|
+
.rf-collection[data-layout='grid'] .rf-collection__group-title {
|
|
65
|
+
grid-column: 1 / -1;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.rf-collection__item {
|
|
69
|
+
min-width: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.rf-collection__card {
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
gap: var(--rf-spacing-xs);
|
|
76
|
+
padding: var(--rf-spacing-md);
|
|
77
|
+
border: 1px solid var(--rf-color-border);
|
|
78
|
+
border-radius: var(--rf-radius-md);
|
|
79
|
+
background: var(--rf-color-surface);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.rf-collection__card:hover {
|
|
83
|
+
background: var(--rf-color-surface-hover);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.rf-collection__title {
|
|
87
|
+
font-weight: 600;
|
|
88
|
+
color: var(--rf-color-text);
|
|
89
|
+
text-decoration: none;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.rf-collection__title:hover {
|
|
93
|
+
color: var(--rf-color-primary);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.rf-collection__field {
|
|
97
|
+
font-size: 0.875em;
|
|
98
|
+
color: var(--rf-color-muted);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* grouping */
|
|
102
|
+
.rf-collection__group {
|
|
103
|
+
margin-top: var(--rf-spacing-md);
|
|
104
|
+
display: flex;
|
|
105
|
+
flex-direction: column;
|
|
106
|
+
/* Tight default for short item rows (the built-in title link, no body). */
|
|
107
|
+
gap: var(--rf-spacing-xs);
|
|
108
|
+
}
|
|
109
|
+
/* Modestly roomier when items carry a body template (block content — a card,
|
|
110
|
+
* callout, list, …), so they don't collide. Body-template items are marked
|
|
111
|
+
* `data-block` by the resolver; the built-in inline title rows are not.
|
|
112
|
+
* Mirrors the rf-relationships rule. */
|
|
113
|
+
.rf-collection__group:has(.rf-collection__item[data-block]) {
|
|
114
|
+
gap: var(--rf-spacing-sm);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* Block-content item — let the body template (card / callout / etc.) fill the
|
|
118
|
+
* container instead of shrink-fitting. No-op in grid mode (items there are
|
|
119
|
+
* already `display: flex` with `flex: 1` on the child). Trim the outer margins
|
|
120
|
+
* of the template's first/last block so the group `gap` controls inter-item
|
|
121
|
+
* spacing — works for any block content, not a wrapper element. */
|
|
122
|
+
.rf-collection__item[data-block] {
|
|
123
|
+
display: block;
|
|
124
|
+
}
|
|
125
|
+
.rf-collection__item[data-block] > :first-child {
|
|
126
|
+
margin-top: 0;
|
|
127
|
+
}
|
|
128
|
+
.rf-collection__item[data-block] > :last-child {
|
|
129
|
+
margin-bottom: 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.rf-collection__group-title {
|
|
133
|
+
margin: 0 0 var(--rf-spacing-sm);
|
|
134
|
+
font-size: 0.875em;
|
|
135
|
+
text-transform: uppercase;
|
|
136
|
+
letter-spacing: 0.05em;
|
|
137
|
+
color: var(--rf-color-muted);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* table layout */
|
|
141
|
+
.rf-collection__table {
|
|
142
|
+
width: 100%;
|
|
143
|
+
border-collapse: collapse;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.rf-collection__table th,
|
|
147
|
+
.rf-collection__table td {
|
|
148
|
+
padding: var(--rf-spacing-sm);
|
|
149
|
+
text-align: left;
|
|
150
|
+
border-bottom: 1px solid var(--rf-color-border);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.rf-collection__table th {
|
|
154
|
+
font-size: 0.875em;
|
|
155
|
+
text-transform: uppercase;
|
|
156
|
+
letter-spacing: 0.05em;
|
|
157
|
+
color: var(--rf-color-muted);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* Heading-template cells (`layout="table"` body) wrap their content as
|
|
161
|
+
* markdown paragraphs, which pick up the global `p { margin-bottom: 1rem }`
|
|
162
|
+
* and leave dead space inside each row. Drop it inside the table — table
|
|
163
|
+
* cells don't want paragraph spacing. */
|
|
164
|
+
.rf-collection__table td p {
|
|
165
|
+
margin: 0;
|
|
166
|
+
}
|
|
@@ -47,7 +47,12 @@
|
|
|
47
47
|
}
|
|
48
48
|
.rf-conversation-message__body p { margin: 0; }
|
|
49
49
|
.rf-conversation-message__body p + p { margin-top: 0.5rem; }
|
|
50
|
-
|
|
50
|
+
/* The speaker name lives inline-bold inside the bubble (the explicit form
|
|
51
|
+
* authors it that way, and the named-speakers form injects it the same way),
|
|
52
|
+
* so the property-carrier span is data only — hide it. Same for the meta
|
|
53
|
+
* tags the engine consumes. `data-field` is the post-engine attribute set by
|
|
54
|
+
* createComponentRenderable. */
|
|
55
|
+
.rf-conversation-message > span[data-field="speaker"],
|
|
56
|
+
.rf-conversation-message > meta[data-field] { display: none; }
|
|
57
|
+
.rf-conversation-message__body > span[data-field],
|
|
51
58
|
.rf-conversation-message__body > meta { display: none; }
|
|
52
|
-
.rf-conversation-message > span[property="speaker"],
|
|
53
|
-
.rf-conversation-message > meta[property] { display: none; }
|
package/styles/runes/diff.css
CHANGED
|
@@ -2,7 +2,19 @@
|
|
|
2
2
|
.rf-diff {
|
|
3
3
|
border: 1px solid var(--rf-color-border);
|
|
4
4
|
border-radius: var(--rf-radius-lg);
|
|
5
|
-
|
|
5
|
+
/* WORK-304 — horizontal scroll lives on `.rf-diff` itself, not on
|
|
6
|
+
* `.rf-diff__split-container`. On mobile the split-container's
|
|
7
|
+
* `min-width: 40rem` makes it wider than the viewport; previously
|
|
8
|
+
* `.rf-diff { overflow: hidden }` clipped the right panel and the
|
|
9
|
+
* touch scroll had nowhere to land. Moving the scroll affordance
|
|
10
|
+
* up one level lets users swipe the entire diff sideways to
|
|
11
|
+
* reveal the off-screen panel; the border-radius still clips the
|
|
12
|
+
* children at the rounded corners because `overflow-x: auto` is
|
|
13
|
+
* non-visible. `overflow-y: hidden` keeps the vertical clip for
|
|
14
|
+
* the rounded top/bottom. */
|
|
15
|
+
overflow-x: auto;
|
|
16
|
+
overflow-y: hidden;
|
|
17
|
+
overscroll-behavior-x: contain;
|
|
6
18
|
font-size: 0.875rem;
|
|
7
19
|
background: var(--rf-color-code-bg);
|
|
8
20
|
}
|
|
@@ -14,12 +26,19 @@
|
|
|
14
26
|
color: var(--rf-color-muted);
|
|
15
27
|
background: var(--rf-color-surface);
|
|
16
28
|
border-bottom: 1px solid var(--rf-color-border);
|
|
29
|
+
/* `.rf-diff` is the horizontal scroll container (so mobile users
|
|
30
|
+
* can swipe to reveal the off-screen split panel). Without
|
|
31
|
+
* sticky, the header would scroll horizontally along with the
|
|
32
|
+
* content and the filename label would slide off-screen.
|
|
33
|
+
* `position: sticky; left: 0` pins the header to the visible left
|
|
34
|
+
* edge of the scroll viewport at all scroll positions. WORK-304. */
|
|
35
|
+
position: sticky;
|
|
36
|
+
left: 0;
|
|
17
37
|
}
|
|
18
38
|
.rf-diff__split-container {
|
|
19
39
|
display: grid;
|
|
20
40
|
grid-template-columns: 1fr 1fr;
|
|
21
41
|
min-width: 40rem;
|
|
22
|
-
overflow-x: auto;
|
|
23
42
|
}
|
|
24
43
|
.rf-diff__split-container .rf-diff__panel:first-child {
|
|
25
44
|
border-right: 1px solid var(--rf-color-border);
|
|
@@ -31,25 +50,68 @@
|
|
|
31
50
|
border-radius: 0;
|
|
32
51
|
background: var(--rf-color-code-bg);
|
|
33
52
|
overflow-x: auto;
|
|
53
|
+
overscroll-behavior-x: contain;
|
|
34
54
|
font-family: var(--rf-font-mono);
|
|
35
55
|
font-size: 0.8125rem;
|
|
36
56
|
line-height: 1.6;
|
|
37
57
|
}
|
|
58
|
+
|
|
59
|
+
/* WORK-304 — inner rows wrapper, sized as `display: grid; min-width:
|
|
60
|
+
* max-content` so every `.rf-diff__line` (grid item) spans the
|
|
61
|
+
* widest line's intrinsic width. The pre is the scroll container
|
|
62
|
+
* (`overflow-x: auto`); this wrapper is what actually expands past
|
|
63
|
+
* the pre's visible width when a line overflows, triggering the
|
|
64
|
+
* pre's scroll and keeping the row tint (+/-/highlight) contiguous
|
|
65
|
+
* across the full scroll region. Mirrors the
|
|
66
|
+
* `pre code { display: grid; min-width: max-content }` pattern in
|
|
67
|
+
* the standalone codeblock at `elements/code.css`. */
|
|
68
|
+
.rf-diff__rows {
|
|
69
|
+
display: grid;
|
|
70
|
+
min-width: max-content;
|
|
71
|
+
}
|
|
72
|
+
/* WORK-304 — annotated line primitive. Three states share one row
|
|
73
|
+
* shape (`add`, `remove`, `highlight`); only the tint token and the
|
|
74
|
+
* gutter rail colour change. The same selector form is reused by the
|
|
75
|
+
* standalone code block for `data-line-status="highlight"` via the
|
|
76
|
+
* `.rf-codeblock` rules below.
|
|
77
|
+
*
|
|
78
|
+
* `display: block` + inline-block children (not `display: flex`) for
|
|
79
|
+
* the line container so the line's intrinsic max-content is the
|
|
80
|
+
* unambiguous sum of children's intrinsic widths — flex container
|
|
81
|
+
* max-content was being clipped by the flex-basis / flex-grow /
|
|
82
|
+
* flex-shrink combination depending on browser, leaving the row
|
|
83
|
+
* tint cut off at the text width when the user scrolled
|
|
84
|
+
* horizontally. `white-space: nowrap` keeps the inline-block
|
|
85
|
+
* children on a single row (the children themselves preserve their
|
|
86
|
+
* own `white-space: pre` for the code). `min-width: max-content`
|
|
87
|
+
* keeps the line at least as wide as its content (full row tint
|
|
88
|
+
* when content overflows the visible viewport); default width =
|
|
89
|
+
* 100% of pre keeps it filling the visible width on short rows. */
|
|
38
90
|
.rf-diff__line {
|
|
91
|
+
/* `display: flex` for internal layout (gutters + content side
|
|
92
|
+
* by side). The line's WIDTH is determined by the parent grid
|
|
93
|
+
* track (`.rf-diff__code`'s `grid-template-columns:
|
|
94
|
+
* minmax(100%, max-content)`), not by the flex sizing here —
|
|
95
|
+
* so the row tint covers the full grid column regardless of
|
|
96
|
+
* how flex sizing would have resolved. */
|
|
39
97
|
display: flex;
|
|
40
98
|
min-height: 1.6em;
|
|
41
99
|
border-left: 3px solid transparent;
|
|
42
100
|
}
|
|
43
|
-
.rf-diff__line[data-
|
|
44
|
-
.rf-diff__line[data-
|
|
101
|
+
.rf-diff__line[data-line-status="equal"] { background: transparent; }
|
|
102
|
+
.rf-diff__line[data-line-status="remove"] {
|
|
45
103
|
background: color-mix(in srgb, var(--rf-color-danger) 18%, transparent);
|
|
46
104
|
border-left-color: var(--rf-color-danger);
|
|
47
105
|
}
|
|
48
|
-
.rf-diff__line[data-
|
|
106
|
+
.rf-diff__line[data-line-status="add"] {
|
|
49
107
|
background: color-mix(in srgb, var(--rf-color-success) 18%, transparent);
|
|
50
108
|
border-left-color: var(--rf-color-success);
|
|
51
109
|
}
|
|
52
|
-
.rf-diff__line[data-
|
|
110
|
+
.rf-diff__line[data-line-status="highlight"] {
|
|
111
|
+
background: var(--rf-color-line-highlight);
|
|
112
|
+
border-left-color: var(--rf-color-line-highlight-rail, var(--rf-color-primary));
|
|
113
|
+
}
|
|
114
|
+
.rf-diff__line[data-line-status="empty"] { background: transparent; }
|
|
53
115
|
.rf-diff__gutter-num {
|
|
54
116
|
flex-shrink: 0;
|
|
55
117
|
padding: 0 0.5rem;
|
|
@@ -65,17 +127,23 @@
|
|
|
65
127
|
* Remove lines colour the before-number; add lines colour the after-number.
|
|
66
128
|
* The opposite side renders empty (no number) which itself signals "nothing
|
|
67
129
|
* here on this side". */
|
|
68
|
-
.rf-diff__line[data-
|
|
130
|
+
.rf-diff__line[data-line-status="remove"] .rf-diff__gutter-num[data-side="before"] {
|
|
69
131
|
color: var(--rf-color-danger);
|
|
70
132
|
}
|
|
71
|
-
.rf-diff__line[data-
|
|
133
|
+
.rf-diff__line[data-line-status="add"] .rf-diff__gutter-num[data-side="after"] {
|
|
72
134
|
color: var(--rf-color-success);
|
|
73
135
|
}
|
|
74
136
|
.rf-diff .rf-codeblock {
|
|
75
137
|
margin: 0;
|
|
76
138
|
}
|
|
77
139
|
.rf-diff__line-content {
|
|
78
|
-
flex: 1
|
|
140
|
+
/* `flex: 1 0 auto` so line-content contributes its
|
|
141
|
+
* `white-space: pre` text width to the line's intrinsic
|
|
142
|
+
* max-content (which the parent grid track reads from); grow:1
|
|
143
|
+
* lets it fill any free space in the row beyond the gutters
|
|
144
|
+
* when the grid track is wider than the line's natural size
|
|
145
|
+
* (short content / wide visible viewport). WORK-304. */
|
|
146
|
+
flex: 1 0 auto;
|
|
79
147
|
white-space: pre;
|
|
80
148
|
padding-right: 1rem;
|
|
81
149
|
/* Pin the row to 1.6em even when the text is empty — the highlighted
|
package/styles/runes/drawer.css
CHANGED
|
@@ -70,8 +70,26 @@ section.rf-drawer .rf-drawer__title {
|
|
|
70
70
|
section.rf-drawer .rf-drawer__body > :first-child { margin-top: 0; }
|
|
71
71
|
section.rf-drawer .rf-drawer__body > :last-child { margin-bottom: 0; }
|
|
72
72
|
|
|
73
|
+
/* In-flow footer — small text, top divider, mirrors the dialog-mode look so
|
|
74
|
+
* authors get the same chrome whether JS is enhancing or not. */
|
|
75
|
+
section.rf-drawer .rf-drawer__footer {
|
|
76
|
+
display: block;
|
|
77
|
+
margin-top: var(--rf-spacing-md);
|
|
78
|
+
padding-top: var(--rf-spacing-sm);
|
|
79
|
+
border-top: 1px solid var(--rf-drawer-border);
|
|
80
|
+
font-size: 0.875rem;
|
|
81
|
+
color: var(--rf-color-muted);
|
|
82
|
+
}
|
|
83
|
+
section.rf-drawer .rf-drawer__footer > :first-child { margin-top: 0; }
|
|
84
|
+
section.rf-drawer .rf-drawer__footer > :last-child { margin-bottom: 0; }
|
|
85
|
+
|
|
73
86
|
/* ─── JS / dialog mode ─────────────────────────────────────────── */
|
|
74
87
|
|
|
88
|
+
/* Dialog base. Crucially the `display: flex` rule below is scoped to the
|
|
89
|
+
* `[open]` state — without that scope, declaring `display: flex` on the
|
|
90
|
+
* bare `dialog.rf-drawer` overrides the browser UA's `display: none` for
|
|
91
|
+
* closed dialogs, so the closed dialog renders visibly as an empty box
|
|
92
|
+
* positioned by the side `inset` rules. */
|
|
75
93
|
dialog.rf-drawer {
|
|
76
94
|
box-sizing: border-box;
|
|
77
95
|
background: var(--rf-drawer-bg);
|
|
@@ -81,28 +99,36 @@ dialog.rf-drawer {
|
|
|
81
99
|
box-shadow: var(--rf-drawer-shadow);
|
|
82
100
|
padding: 0;
|
|
83
101
|
margin: 0;
|
|
84
|
-
overflow:
|
|
102
|
+
overflow: hidden;
|
|
85
103
|
max-width: calc(100vw - 2 * var(--rf-drawer-gutter));
|
|
86
104
|
max-height: calc(100vh - 2 * var(--rf-drawer-gutter));
|
|
87
105
|
}
|
|
88
106
|
|
|
107
|
+
/* Flex column layout only when the dialog is actually open. The header
|
|
108
|
+
* and footer pin via `flex: 0 0 auto`; the body scrolls via `flex: 1 1
|
|
109
|
+
* auto; overflow-y: auto`. The dialog's `max-height` cap on the dialog
|
|
110
|
+
* provides the scroll context. */
|
|
111
|
+
dialog.rf-drawer[open] {
|
|
112
|
+
display: flex;
|
|
113
|
+
flex-direction: column;
|
|
114
|
+
}
|
|
115
|
+
|
|
89
116
|
dialog.rf-drawer::backdrop {
|
|
90
117
|
background: rgb(0 0 0 / 0.35);
|
|
91
118
|
backdrop-filter: blur(2px);
|
|
92
119
|
}
|
|
93
120
|
|
|
94
121
|
dialog.rf-drawer .rf-drawer__header {
|
|
122
|
+
flex: 0 0 auto;
|
|
95
123
|
display: flex;
|
|
96
124
|
align-items: center;
|
|
97
125
|
justify-content: space-between;
|
|
98
126
|
gap: var(--rf-spacing-md);
|
|
99
127
|
padding: var(--rf-spacing-md) var(--rf-spacing-lg);
|
|
100
128
|
border-bottom: 1px solid var(--rf-drawer-border);
|
|
101
|
-
position: sticky;
|
|
102
|
-
top: 0;
|
|
103
129
|
background: var(--rf-drawer-bg);
|
|
104
|
-
|
|
105
|
-
|
|
130
|
+
}
|
|
131
|
+
dialog.rf-drawer .rf-drawer__title {
|
|
106
132
|
margin: 0;
|
|
107
133
|
font-size: 1.05rem;
|
|
108
134
|
font-weight: 600;
|
|
@@ -126,8 +152,26 @@ dialog.rf-drawer .rf-drawer__close:hover {
|
|
|
126
152
|
}
|
|
127
153
|
|
|
128
154
|
dialog.rf-drawer .rf-drawer__body {
|
|
155
|
+
flex: 1 1 auto;
|
|
156
|
+
overflow-y: auto;
|
|
129
157
|
padding: var(--rf-spacing-md) var(--rf-spacing-lg);
|
|
158
|
+
min-height: 0;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* Dialog footer — small text, top divider, pinned at bottom via flex.
|
|
162
|
+
* Stays visible regardless of body scroll depth so links like "View
|
|
163
|
+
* source on GitHub →" (the SPEC-078 use case) are always one tap away. */
|
|
164
|
+
dialog.rf-drawer .rf-drawer__footer {
|
|
165
|
+
flex: 0 0 auto;
|
|
166
|
+
padding: var(--rf-spacing-sm) var(--rf-spacing-lg);
|
|
167
|
+
border-top: 1px solid var(--rf-drawer-border);
|
|
168
|
+
background: var(--rf-drawer-bg);
|
|
169
|
+
font-size: 0.875rem;
|
|
170
|
+
color: var(--rf-color-muted);
|
|
130
171
|
}
|
|
172
|
+
dialog.rf-drawer .rf-drawer__footer > :first-child { margin-top: 0; }
|
|
173
|
+
dialog.rf-drawer .rf-drawer__footer > :last-child { margin-bottom: 0; }
|
|
174
|
+
dialog.rf-drawer .rf-drawer__footer p { margin: 0; }
|
|
131
175
|
|
|
132
176
|
/* Collapse the vertical margins of first / last children inside the body
|
|
133
177
|
* so the drawer's own padding is what spaces content from the chrome —
|
|
@@ -282,7 +326,8 @@ dialog.rf-drawer[data-state="closing"]::backdrop {
|
|
|
282
326
|
*/
|
|
283
327
|
@media (max-width: 640px) {
|
|
284
328
|
dialog.rf-drawer .rf-drawer__header,
|
|
285
|
-
dialog.rf-drawer .rf-drawer__body
|
|
329
|
+
dialog.rf-drawer .rf-drawer__body,
|
|
330
|
+
dialog.rf-drawer .rf-drawer__footer {
|
|
286
331
|
padding: 0.75rem 1rem;
|
|
287
332
|
}
|
|
288
333
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* file-ref — path-based inline reference to a project file (SPEC-078).
|
|
2
|
+
*
|
|
3
|
+
* Renders as `<span class="rf-file-ref"><a>label</a></span>` in prose
|
|
4
|
+
* (plus an invisible hoist sentinel `<meta>` when preview="drawer").
|
|
5
|
+
* The span carries the data-rune class; the inner `<a>` is the click
|
|
6
|
+
* target with its own visual treatment.
|
|
7
|
+
*
|
|
8
|
+
* Without preview, the link points at the canonical GitHub URL — give
|
|
9
|
+
* it a small external-link affordance so readers know they're about to
|
|
10
|
+
* leave the page. With preview, it points at the hoisted drawer's
|
|
11
|
+
* fragment id; visually the same inline-link affordance — what makes
|
|
12
|
+
* it a "preview link" rather than a "navigate-away link" is the drawer
|
|
13
|
+
* that opens on click, not extra inline chrome.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
.rf-file-ref {
|
|
17
|
+
display: inline;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.rf-file-ref > a {
|
|
21
|
+
color: var(--rf-color-primary);
|
|
22
|
+
text-decoration: underline;
|
|
23
|
+
text-decoration-thickness: 1px;
|
|
24
|
+
text-underline-offset: 2px;
|
|
25
|
+
font-family: var(--rf-font-mono, ui-monospace, SFMono-Regular, monospace);
|
|
26
|
+
font-size: 0.9375em;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.rf-file-ref > a:hover {
|
|
30
|
+
text-decoration-thickness: 2px;
|
|
31
|
+
}
|
package/styles/runes/nav.css
CHANGED
|
@@ -67,6 +67,21 @@
|
|
|
67
67
|
color: var(--rf-color-muted);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
/* Items with an inline badge (recognised by the nav schema and tagged with
|
|
71
|
+
* data-name="badge") sit on one row so the badge rides alongside the link
|
|
72
|
+
* instead of wrapping to the next line — the link's `display: block` would
|
|
73
|
+
* otherwise eat the full row. */
|
|
74
|
+
.rf-nav-item:has(> .rf-badge[data-name="badge"]) {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
gap: 0.375rem;
|
|
78
|
+
padding: 0;
|
|
79
|
+
}
|
|
80
|
+
.rf-nav-item:has(> .rf-badge[data-name="badge"]) > .rf-nav-item__link {
|
|
81
|
+
flex: 0 1 auto;
|
|
82
|
+
min-width: 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
70
85
|
/* ─── Collapsible groups (vertical sidebar) ───────────────────────────── */
|
|
71
86
|
|
|
72
87
|
.rf-nav--collapsible .rf-nav-group h2,
|