@refrakt-md/lumina 0.21.0 → 0.23.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.
Files changed (131) hide show
  1. package/base.css +2 -1
  2. package/dist/config.d.ts.map +1 -1
  3. package/dist/config.js +7 -0
  4. package/dist/config.js.map +1 -1
  5. package/dist/tokens.d.ts +5 -3
  6. package/dist/tokens.d.ts.map +1 -1
  7. package/dist/tokens.js +44 -3
  8. package/dist/tokens.js.map +1 -1
  9. package/index.css +11 -1
  10. package/package.json +7 -5
  11. package/styles/base/attributes.css +6 -7
  12. package/styles/dimensions/checklist.css +7 -36
  13. package/styles/dimensions/cover.css +13 -95
  14. package/styles/dimensions/density.css +6 -3
  15. package/styles/dimensions/frame.css +7 -4
  16. package/styles/dimensions/media.css +14 -61
  17. package/styles/dimensions/metadata.css +30 -80
  18. package/styles/dimensions/sections.css +16 -30
  19. package/styles/dimensions/sequence.css +17 -82
  20. package/styles/dimensions/state.css +39 -56
  21. package/styles/dimensions/substrate.css +3 -0
  22. package/styles/dimensions/surfaces.css +73 -113
  23. package/styles/elements/blockquote.css +3 -2
  24. package/styles/elements/code.css +3 -0
  25. package/styles/elements/table.css +3 -0
  26. package/styles/global.css +24 -63
  27. package/styles/layouts/blog.css +34 -95
  28. package/styles/layouts/default.css +12 -86
  29. package/styles/layouts/docs.css +9 -159
  30. package/styles/layouts/mobile.css +3 -52
  31. package/styles/layouts/on-this-page.css +8 -7
  32. package/styles/layouts/plan.css +27 -158
  33. package/styles/layouts/search.css +17 -82
  34. package/styles/layouts/split.css +24 -169
  35. package/styles/layouts/theme-toggle.css +3 -29
  36. package/styles/layouts/version-switcher.css +9 -10
  37. package/styles/runes/accordion.css +25 -68
  38. package/styles/runes/aggregate.css +4 -13
  39. package/styles/runes/annotate.css +11 -40
  40. package/styles/runes/api.css +4 -1
  41. package/styles/runes/audio.css +12 -50
  42. package/styles/runes/badge.css +5 -2
  43. package/styles/runes/bar.css +3 -0
  44. package/styles/runes/bento.css +18 -161
  45. package/styles/runes/bg.css +3 -37
  46. package/styles/runes/blog.css +18 -20
  47. package/styles/runes/bond.css +6 -26
  48. package/styles/runes/breadcrumb.css +7 -15
  49. package/styles/runes/budget.css +23 -45
  50. package/styles/runes/bug.css +5 -2
  51. package/styles/runes/card.css +27 -95
  52. package/styles/runes/cast.css +10 -27
  53. package/styles/runes/changelog.css +13 -17
  54. package/styles/runes/character.css +6 -20
  55. package/styles/runes/chart.css +15 -57
  56. package/styles/runes/codegroup.css +18 -26
  57. package/styles/runes/collection.css +8 -85
  58. package/styles/runes/compare.css +8 -19
  59. package/styles/runes/comparison.css +29 -56
  60. package/styles/runes/conversation.css +9 -31
  61. package/styles/runes/cta.css +17 -40
  62. package/styles/runes/datatable.css +33 -48
  63. package/styles/runes/decision.css +5 -2
  64. package/styles/runes/design-context.css +5 -4
  65. package/styles/runes/details.css +9 -17
  66. package/styles/runes/diagram.css +8 -16
  67. package/styles/runes/diff.css +11 -94
  68. package/styles/runes/drawer.css +9 -113
  69. package/styles/runes/embed.css +5 -13
  70. package/styles/runes/event.css +5 -3
  71. package/styles/runes/expand.css +10 -45
  72. package/styles/runes/faction.css +6 -12
  73. package/styles/runes/feature.css +15 -43
  74. package/styles/runes/figure.css +7 -26
  75. package/styles/runes/file-ref.css +3 -18
  76. package/styles/runes/form.css +19 -48
  77. package/styles/runes/gallery.css +8 -140
  78. package/styles/runes/grid.css +4 -56
  79. package/styles/runes/hero.css +28 -140
  80. package/styles/runes/hint.css +23 -48
  81. package/styles/runes/howto.css +9 -31
  82. package/styles/runes/itinerary.css +15 -44
  83. package/styles/runes/juxtapose.css +17 -92
  84. package/styles/runes/lore.css +7 -14
  85. package/styles/runes/map.css +9 -42
  86. package/styles/runes/mediatext.css +4 -45
  87. package/styles/runes/milestone.css +15 -28
  88. package/styles/runes/mockup.css +10 -115
  89. package/styles/runes/nav.css +37 -212
  90. package/styles/runes/organization.css +6 -5
  91. package/styles/runes/page-section.css +3 -4
  92. package/styles/runes/pagination.css +10 -42
  93. package/styles/runes/palette.css +16 -35
  94. package/styles/runes/placeholder.css +16 -0
  95. package/styles/runes/plan-history.css +23 -43
  96. package/styles/runes/plan-progress.css +6 -7
  97. package/styles/runes/plan-ref.css +4 -1
  98. package/styles/runes/playlist.css +10 -44
  99. package/styles/runes/plot.css +9 -25
  100. package/styles/runes/preview.css +9 -34
  101. package/styles/runes/pricing.css +23 -41
  102. package/styles/runes/progress.css +8 -27
  103. package/styles/runes/pullquote.css +9 -31
  104. package/styles/runes/realm.css +6 -12
  105. package/styles/runes/recipe.css +12 -36
  106. package/styles/runes/relationships.css +5 -36
  107. package/styles/runes/reveal.css +17 -22
  108. package/styles/runes/sandbox.css +9 -39
  109. package/styles/runes/section.css +10 -24
  110. package/styles/runes/showcase.css +3 -20
  111. package/styles/runes/sidenote.css +5 -4
  112. package/styles/runes/snippet.css +3 -0
  113. package/styles/runes/spacing.css +14 -33
  114. package/styles/runes/spec.css +5 -2
  115. package/styles/runes/steps.css +14 -46
  116. package/styles/runes/storyboard.css +4 -19
  117. package/styles/runes/swatch.css +4 -7
  118. package/styles/runes/symbol.css +16 -14
  119. package/styles/runes/tabs.css +15 -18
  120. package/styles/runes/testimonial.css +12 -13
  121. package/styles/runes/textblock.css +6 -24
  122. package/styles/runes/timeline.css +10 -28
  123. package/styles/runes/tint.css +3 -0
  124. package/styles/runes/toc.css +9 -7
  125. package/styles/runes/track.css +12 -41
  126. package/styles/runes/typography.css +15 -27
  127. package/styles/runes/work.css +5 -2
  128. package/styles/runes/xref.css +3 -1
  129. package/tokens/base.css +56 -66
  130. package/tokens/dark.css +79 -80
  131. package/styles/dimensions/guest-posture.css +0 -27
@@ -1,31 +1,16 @@
1
- /* Conversation */
1
+ @layer skin {
2
+ /* Conversation — skin. The column stack, bubble flex/width/side-alignment, and the
3
+ * data-carrier hides live in @refrakt-md/skeleton (styles/runes/conversation.css). */
2
4
  .rf-conversation {
3
- display: flex;
4
- flex-direction: column;
5
5
  gap: 1rem;
6
6
  max-width: 40rem;
7
7
  }
8
8
  .rf-conversation__messages {
9
- display: flex;
10
- flex-direction: column;
11
9
  gap: 1rem;
12
10
  }
13
- .rf-conversation-message {
14
- display: flex;
15
- flex-direction: column;
16
- max-width: 80%;
17
- }
18
- .rf-conversation-message--left {
19
- align-self: flex-start;
20
- align-items: flex-start;
21
- }
22
- .rf-conversation-message--right {
23
- align-self: flex-end;
24
- align-items: flex-end;
25
- }
26
11
  .rf-conversation-message__speaker {
27
- font-size: 0.75rem;
28
- font-weight: 600;
12
+ font-size: var(--rf-text-xs);
13
+ font-weight: var(--rf-weight-semibold);
29
14
  color: var(--rf-color-muted);
30
15
  margin-bottom: 0.25rem;
31
16
  padding: 0 0.75rem;
@@ -33,8 +18,8 @@
33
18
  .rf-conversation-message__body {
34
19
  padding: 0.75rem 1rem;
35
20
  border-radius: 1rem;
36
- font-size: 0.9375rem;
37
- line-height: 1.5;
21
+ font-size: var(--rf-text);
22
+ line-height: var(--rf-leading-normal);
38
23
  }
39
24
  .rf-conversation-message--left .rf-conversation-message__body {
40
25
  background: var(--rf-color-surface);
@@ -47,12 +32,5 @@
47
32
  }
48
33
  .rf-conversation-message__body p { margin: 0; }
49
34
  .rf-conversation-message__body p + p { margin-top: 0.5rem; }
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],
58
- .rf-conversation-message__body > meta { display: none; }
35
+
36
+ }
@@ -1,4 +1,6 @@
1
- /* Call to Action */
1
+ @layer skin {
2
+ /* Call to Action — skin. The preamble/eyebrow/button-row layout + mobile stack
3
+ * live in @refrakt-md/skeleton (styles/runes/cta.css). */
2
4
  .rf-cta {
3
5
  padding: 3.5rem 2rem 3rem;
4
6
  }
@@ -8,16 +10,14 @@
8
10
  text-align: center;
9
11
  }
10
12
  .rf-cta__preamble {
11
- flex-direction: column;
12
- align-items: center;
13
13
  gap: 0.25rem;
14
14
  margin-bottom: 1.5rem;
15
15
  }
16
16
  /* Higher specificity needed to override .rf-cta p (0,1,1) */
17
17
  .rf-cta .rf-cta__eyebrow {
18
- font-size: 0.875rem;
19
- font-weight: 600;
20
- letter-spacing: 0.05em;
18
+ font-size: var(--rf-text-sm);
19
+ font-weight: var(--rf-weight-semibold);
20
+ letter-spacing: var(--rf-tracking-wider);
21
21
  text-transform: uppercase;
22
22
  color: var(--rf-color-primary);
23
23
  margin: 0 0 0.75rem;
@@ -25,15 +25,13 @@
25
25
  }
26
26
  /* Pill-badge variant when eyebrow contains a link */
27
27
  .rf-cta .rf-cta__eyebrow:has(a) {
28
- display: inline-block;
29
- position: relative;
30
28
  padding: 0.25rem 0.875rem;
31
29
  border: 1px solid var(--rf-color-border);
32
30
  border-radius: var(--rf-radius-full);
33
31
  color: var(--rf-color-text);
34
- font-weight: 400;
32
+ font-weight: var(--rf-weight-normal);
35
33
  text-transform: none;
36
- letter-spacing: 0;
34
+ letter-spacing: var(--rf-tracking-normal);
37
35
  transition: border-color 150ms ease;
38
36
  }
39
37
  .rf-cta .rf-cta__eyebrow:has(a):hover {
@@ -41,13 +39,10 @@
41
39
  }
42
40
  .rf-cta .rf-cta__eyebrow:has(a) a {
43
41
  color: var(--rf-color-primary);
44
- font-weight: 600;
42
+ font-weight: var(--rf-weight-semibold);
45
43
  text-decoration: none;
46
44
  }
47
45
  .rf-cta .rf-cta__eyebrow:has(a) a::before {
48
- content: '';
49
- position: absolute;
50
- inset: 0;
51
46
  border-radius: inherit;
52
47
  }
53
48
  .rf-cta__image {
@@ -57,12 +52,12 @@
57
52
  .rf-cta h2,
58
53
  .rf-cta h3,
59
54
  .rf-cta__headline {
60
- font-size: 2.5rem;
61
- font-weight: 750;
62
- letter-spacing: -0.03em;
55
+ font-size: var(--rf-text-4xl);
56
+ font-weight: var(--rf-weight-bold);
57
+ letter-spacing: var(--rf-tracking-tight);
63
58
  margin-bottom: 0.75rem;
64
59
  margin-top: 0;
65
- line-height: 1.15;
60
+ line-height: var(--rf-leading-tight);
66
61
  background: linear-gradient(135deg, var(--rf-color-text) 0%, var(--rf-color-muted) 100%);
67
62
  -webkit-background-clip: text;
68
63
  -webkit-text-fill-color: transparent;
@@ -71,18 +66,14 @@
71
66
  /* Higher specificity needed to override .rf-cta p (0,1,1) */
72
67
  .rf-cta p,
73
68
  .rf-cta .rf-cta__blurb {
74
- font-size: 1.15rem;
69
+ font-size: var(--rf-text-lg);
75
70
  color: var(--rf-color-muted);
76
71
  max-width: 540px;
77
72
  margin: 0 auto 2rem;
78
- line-height: 1.65;
73
+ line-height: var(--rf-leading-relaxed);
79
74
  }
80
75
  .rf-cta ul {
81
- display: flex;
82
76
  gap: 0.75rem;
83
- justify-content: center;
84
- flex-wrap: wrap;
85
- list-style: none;
86
77
  padding: 0;
87
78
  margin: 0;
88
79
  }
@@ -92,13 +83,11 @@
92
83
  }
93
84
  .rf-cta li a,
94
85
  .rf-cta nav a {
95
- display: inline-flex;
96
- align-items: center;
97
86
  padding: 0.625rem 1.5rem;
98
87
  border-radius: var(--rf-radius-sm);
99
88
  text-decoration: none;
100
- font-weight: 600;
101
- font-size: 0.925rem;
89
+ font-weight: var(--rf-weight-semibold);
90
+ font-size: var(--rf-text-sm);
102
91
  transition: all 200ms ease;
103
92
  }
104
93
  .rf-cta li:first-child a {
@@ -143,16 +132,4 @@
143
132
  max-width: none;
144
133
  }
145
134
 
146
- /* Mobile: stack action buttons full-width so multi-button CTAs line up */
147
- @media (max-width: 640px) {
148
- .rf-cta ul {
149
- flex-direction: column;
150
- align-items: stretch;
151
- }
152
- .rf-cta li a,
153
- .rf-cta nav a {
154
- justify-content: center;
155
- width: 100%;
156
- box-sizing: border-box;
157
- }
158
135
  }
@@ -1,16 +1,22 @@
1
- /* DataTable */
1
+ @layer skin {
2
+ /* DataTable — skin. The toolbar/pagination flex + input width live in
3
+ * @refrakt-md/skeleton (styles/runes/datatable.css). The table chrome (header
4
+ * strip, cell padding, row borders, hover) stays here. */
5
+
6
+ /* The sunken surface chrome (fill + border + container radius) stays, but the
7
+ * elevation padding is dropped: the toolbar, table, and pagination each carry
8
+ * their own rhythm and sit flush with the surface edge. */
9
+ .rf-datatable {
10
+ padding: 0;
11
+ }
2
12
  .rf-datatable__toolbar {
3
- display: flex;
4
- justify-content: flex-end;
5
- padding: 0.5rem 0.75rem;
6
- background: var(--rf-color-surface);
13
+ padding: var(--rf-spacing-sm);
7
14
  }
8
15
  .rf-datatable__input {
9
- width: 14rem;
10
- padding: 0.35rem 0.625rem;
16
+ padding: var(--rf-spacing-snug);
11
17
  border: 1px solid var(--rf-color-border);
12
- border-radius: var(--rf-radius-sm);
13
- font-size: 0.8rem;
18
+ border-radius: var(--rf-radius-media);
19
+ font-size: var(--rf-text-xs);
14
20
  font-family: var(--rf-font-sans);
15
21
  background: var(--rf-color-bg);
16
22
  color: var(--rf-color-text);
@@ -20,65 +26,42 @@
20
26
  border-color: var(--rf-color-primary);
21
27
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--rf-color-primary) 15%, transparent);
22
28
  }
23
- .rf-datatable__content .rf-datatable__table {
24
- border: none;
25
- border-radius: 0;
26
- margin: 0;
27
- overflow: visible;
28
- }
29
- .rf-datatable__content .rf-datatable__table th {
30
- background: var(--rf-color-surface);
31
- }
32
- .rf-datatable__content .rf-datatable__table th:first-child,
33
- .rf-datatable__content .rf-datatable__table th:last-child {
34
- border-radius: 0;
35
- }
36
- .rf-datatable__content table {
29
+ .rf-datatable__table {
37
30
  width: 100%;
38
31
  border-collapse: collapse;
39
32
  margin: 0;
40
33
  }
41
- .rf-datatable__content .rf-table-wrapper {
42
- margin: 0;
43
- border: none;
44
- border-radius: 0;
45
- overflow: visible;
46
- }
47
- .rf-datatable__content th {
34
+ .rf-datatable__table th {
48
35
  text-align: left;
49
36
  padding: 0.75rem 1rem;
50
- font-size: 0.75rem;
51
- font-weight: 600;
37
+ font-size: var(--rf-text-xs);
38
+ font-weight: var(--rf-weight-semibold);
52
39
  text-transform: uppercase;
53
- letter-spacing: 0.05em;
40
+ letter-spacing: var(--rf-tracking-wider);
54
41
  color: var(--rf-color-muted);
55
- background: var(--rf-color-surface);
56
42
  }
57
- .rf-datatable__content th[style*="cursor"]:hover {
43
+ /* Sortable headers (the behavior sets inline cursor:pointer on them). */
44
+ .rf-datatable__table th[style*="cursor"]:hover {
58
45
  color: var(--rf-color-text);
59
46
  }
60
- .rf-datatable__content .sort-indicator {
61
- font-size: 0.65rem;
47
+ .rf-datatable__sort-indicator {
48
+ font-size: var(--rf-text-xs);
62
49
  opacity: 0.7;
63
50
  }
64
- .rf-datatable__content td {
51
+ .rf-datatable__table td {
65
52
  padding: 0.75rem 1rem;
66
53
  border-bottom: 1px solid var(--rf-color-border);
67
- font-size: 0.875rem;
54
+ font-size: var(--rf-text-sm);
68
55
  }
69
- .rf-datatable__content tr:last-child td {
56
+ .rf-datatable__table tr:last-child td {
70
57
  border-bottom: none;
71
58
  }
72
- .rf-datatable__content tr:hover td {
59
+ .rf-datatable__table tr:hover td {
73
60
  background: var(--rf-color-surface-hover);
74
61
  }
75
62
  .rf-datatable__pagination {
76
- display: flex;
77
- align-items: center;
78
- justify-content: flex-end;
79
63
  gap: 0.75rem;
80
- padding: 0.5rem 0.75rem;
81
- background: var(--rf-color-surface);
64
+ padding: var(--rf-spacing-sm);
82
65
  }
83
66
  .rf-datatable__page-btn {
84
67
  padding: 0.25rem 0.5rem;
@@ -86,7 +69,7 @@
86
69
  border-radius: var(--rf-radius-sm);
87
70
  background: transparent;
88
71
  color: var(--rf-color-muted);
89
- font-size: 0.8rem;
72
+ font-size: var(--rf-text-xs);
90
73
  font-family: var(--rf-font-sans);
91
74
  cursor: pointer;
92
75
  transition: color 150ms ease, background 150ms ease;
@@ -100,6 +83,8 @@
100
83
  cursor: not-allowed;
101
84
  }
102
85
  .rf-datatable__page-info {
103
- font-size: 0.75rem;
86
+ font-size: var(--rf-text-xs);
104
87
  color: var(--rf-color-muted);
105
88
  }
89
+
90
+ }
@@ -1,3 +1,4 @@
1
+ @layer skin {
1
2
  /* Decision */
2
3
 
3
4
  /* SPEC-079: eyebrow + metadata zone names replace header-primary /
@@ -17,8 +18,8 @@
17
18
  }
18
19
 
19
20
  .rf-decision__body {
20
- font-size: 0.925rem;
21
- line-height: 1.65;
21
+ font-size: var(--rf-text-sm);
22
+ line-height: var(--rf-leading-relaxed);
22
23
  }
23
24
  .rf-decision__body > section {
24
25
  margin-top: 1rem;
@@ -28,3 +29,5 @@
28
29
  .rf-decision__body > section:first-child {
29
30
  margin-top: 0.75rem;
30
31
  }
32
+
33
+ }
@@ -1,12 +1,11 @@
1
+ @layer skin {
1
2
  /* Design Context — unified token card wrapper */
2
3
  .rf-design-context__title {
3
- font-size: 1.25rem;
4
- font-weight: 700;
4
+ font-size: var(--rf-text-xl);
5
+ font-weight: var(--rf-weight-bold);
5
6
  margin-bottom: 1rem;
6
7
  }
7
8
  .rf-design-context__sections {
8
- display: flex;
9
- flex-direction: column;
10
9
  gap: 1.5rem;
11
10
  }
12
11
 
@@ -21,3 +20,5 @@
21
20
  border-radius: 0;
22
21
  padding: 0;
23
22
  }
23
+
24
+ }
@@ -1,38 +1,30 @@
1
- /* Details */
2
- .rf-details {
3
- }
1
+ @layer skin {
2
+ /* Details — skin. The summary flex, marker hide, disclosure-marker push, and the
3
+ * open-rotate live in @refrakt-md/skeleton (styles/runes/details.css). */
4
4
  .rf-details__summary {
5
- display: flex;
6
- align-items: center;
7
5
  gap: 0.5rem;
8
6
  padding: 0.75rem 0;
9
- font-weight: 600;
10
- font-size: 0.925rem;
7
+ font-weight: var(--rf-weight-semibold);
8
+ font-size: var(--rf-text-sm);
11
9
  cursor: pointer;
12
10
  user-select: none;
13
- list-style: none;
14
11
  transition: background-color 200ms ease;
15
12
  }
16
- .rf-details__summary::-webkit-details-marker { display: none; }
17
- .rf-details__summary::marker { display: none; content: ''; }
18
13
  .rf-details__summary:hover {
19
14
  color: var(--rf-color-primary);
20
15
  }
21
16
  .rf-details__summary::after {
22
17
  content: '▸';
23
- flex-shrink: 0;
24
- margin-left: auto;
25
18
  color: var(--rf-color-muted);
26
19
  transition: transform 200ms ease;
27
20
  }
28
- .rf-details[open] .rf-details__summary::after {
29
- transform: rotate(90deg);
30
- }
31
21
  .rf-details__body {
32
22
  padding: 0 0 1rem;
33
- font-size: 0.925rem;
34
- line-height: 1.65;
23
+ font-size: var(--rf-text-sm);
24
+ line-height: var(--rf-leading-relaxed);
35
25
  }
36
26
  .rf-details__body p:last-child {
37
27
  margin-bottom: 0;
38
28
  }
29
+
30
+ }
@@ -1,31 +1,21 @@
1
- /* Diagram */
1
+ @layer skin {
2
+ /* Diagram — skin. The block/clip, scrollable container, and responsive SVG live in
3
+ * @refrakt-md/skeleton (styles/runes/diagram.css). */
2
4
  .rf-diagram {
3
- display: block;
4
5
  border-radius: var(--rf-radius-lg);
5
6
  padding: 1.5rem;
6
7
  text-align: center;
7
- overflow: hidden;
8
8
  }
9
9
  .rf-diagram__title {
10
- font-weight: 600;
11
- font-size: 1rem;
10
+ font-weight: var(--rf-weight-semibold);
11
+ font-size: var(--rf-text);
12
12
  margin-bottom: 1rem;
13
13
  }
14
- .rf-diagram__container {
15
- display: flex;
16
- justify-content: center;
17
- overflow-x: auto;
18
- }
19
- .rf-diagram__container svg {
20
- max-width: 100%;
21
- height: auto;
22
- }
23
14
  .rf-diagram__source {
24
15
  text-align: left;
25
- font-size: 0.875rem;
16
+ font-size: var(--rf-text-sm);
26
17
  margin: 0;
27
18
  }
28
-
29
19
  /* Mermaid SVG overrides */
30
20
  .rf-diagram__container .label {
31
21
  font-family: var(--rf-font-sans) !important;
@@ -38,3 +28,5 @@
38
28
  fill: var(--rf-color-muted) !important;
39
29
  stroke: var(--rf-color-muted) !important;
40
30
  }
31
+
32
+ }
@@ -1,44 +1,20 @@
1
- /* Diff */
1
+ @layer skin {
2
+ /* Diff — skin. The scroll container, sticky header, split grid, rows grid, line
3
+ * flex + gutter sizing live in @refrakt-md/skeleton (styles/runes/diff.css). */
2
4
  .rf-diff {
3
5
  border: 1px solid var(--rf-color-border);
4
6
  border-radius: var(--rf-radius-lg);
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;
18
- font-size: 0.875rem;
7
+ font-size: var(--rf-text-sm);
19
8
  background: var(--rf-color-code-bg);
20
9
  }
21
10
  .rf-diff__header {
22
11
  padding: 0.5rem 1rem;
23
12
  font-family: var(--rf-font-sans);
24
- font-size: 0.75rem;
25
- font-weight: 600;
13
+ font-size: var(--rf-text-xs);
14
+ font-weight: var(--rf-weight-semibold);
26
15
  color: var(--rf-color-muted);
27
16
  background: var(--rf-color-surface);
28
17
  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;
37
- }
38
- .rf-diff__split-container {
39
- display: grid;
40
- grid-template-columns: 1fr 1fr;
41
- min-width: 40rem;
42
18
  }
43
19
  .rf-diff__split-container .rf-diff__panel:first-child {
44
20
  border-right: 1px solid var(--rf-color-border);
@@ -49,53 +25,11 @@
49
25
  border: none;
50
26
  border-radius: 0;
51
27
  background: var(--rf-color-code-bg);
52
- overflow-x: auto;
53
- overscroll-behavior-x: contain;
54
28
  font-family: var(--rf-font-mono);
55
- font-size: 0.8125rem;
56
- line-height: 1.6;
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;
29
+ font-size: var(--rf-text-sm);
30
+ line-height: var(--rf-leading-relaxed);
71
31
  }
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. */
90
32
  .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. */
97
- display: flex;
98
- min-height: 1.6em;
99
33
  border-left: 3px solid transparent;
100
34
  }
101
35
  .rf-diff__line[data-line-status="equal"] { background: transparent; }
@@ -113,20 +47,13 @@
113
47
  }
114
48
  .rf-diff__line[data-line-status="empty"] { background: transparent; }
115
49
  .rf-diff__gutter-num {
116
- flex-shrink: 0;
117
50
  padding: 0 0.5rem;
118
- width: 2.5em;
119
- min-height: 1.6em;
120
51
  text-align: right;
121
- font-size: 0.75rem;
52
+ font-size: var(--rf-text-xs);
122
53
  font-variant-numeric: tabular-nums;
123
54
  user-select: none;
124
55
  color: var(--rf-color-muted);
125
56
  }
126
- /* Change-type colour drives the directional cue — no more +/- prefix.
127
- * Remove lines colour the before-number; add lines colour the after-number.
128
- * The opposite side renders empty (no number) which itself signals "nothing
129
- * here on this side". */
130
57
  .rf-diff__line[data-line-status="remove"] .rf-diff__gutter-num[data-side="before"] {
131
58
  color: var(--rf-color-danger);
132
59
  }
@@ -137,18 +64,8 @@
137
64
  margin: 0;
138
65
  }
139
66
  .rf-diff__line-content {
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;
147
67
  white-space: pre;
148
68
  padding-right: 1rem;
149
- /* Pin the row to 1.6em even when the text is empty — the highlighted
150
- * span for an empty input has no inline content to establish a line
151
- * box, so without this the flex item collapses below the parent's
152
- * min-height and rows visually drift in the split-mode grid. */
153
- min-height: 1.6em;
69
+ }
70
+
154
71
  }