contain-css-svelte 1.2.3 → 1.4.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 (50) hide show
  1. package/dist/Card.svelte +216 -288
  2. package/dist/controls/Button.svelte +39 -1
  3. package/dist/controls/ButtonLink.svelte +39 -1
  4. package/dist/controls/Checkbox.svelte +38 -0
  5. package/dist/controls/CircleButton.svelte +39 -1
  6. package/dist/controls/Input.svelte +39 -1
  7. package/dist/controls/RadioButton.svelte +38 -0
  8. package/dist/controls/Select.svelte +38 -0
  9. package/dist/controls/Slider.svelte +39 -1
  10. package/dist/controls/TabItem.svelte +39 -1
  11. package/dist/controls/Toggle.svelte +39 -1
  12. package/dist/dropdowns/DropdownMenu.svelte +39 -1
  13. package/dist/index.d.ts +2 -1
  14. package/dist/index.js +2 -1
  15. package/dist/layout/Accordion.svelte +39 -1
  16. package/dist/layout/Bar.svelte +49 -1
  17. package/dist/layout/ColumnContainer.svelte +39 -1
  18. package/dist/layout/Columns.svelte +39 -1
  19. package/dist/layout/Container.svelte +217 -292
  20. package/dist/layout/DataList.svelte +39 -1
  21. package/dist/layout/DataListItem.svelte +217 -292
  22. package/dist/layout/Fieldset.svelte +39 -1
  23. package/dist/layout/Form.svelte +217 -292
  24. package/dist/layout/FormItem.svelte +39 -1
  25. package/dist/layout/GridLayout.svelte +38 -0
  26. package/dist/layout/Hero.svelte +217 -292
  27. package/dist/layout/Inline.svelte +45 -1
  28. package/dist/layout/MenuList.svelte +39 -1
  29. package/dist/layout/Page.svelte +44 -2
  30. package/dist/layout/RowContainer.svelte +39 -1
  31. package/dist/layout/Sidebar.svelte +757 -65
  32. package/dist/layout/Sidebar.svelte.d.ts +58 -1
  33. package/dist/layout/SidebarContainer.svelte +198 -0
  34. package/dist/layout/SidebarContainer.svelte.d.ts +20 -0
  35. package/dist/layout/SplitPane.svelte +39 -1
  36. package/dist/layout/Stack.svelte +45 -1
  37. package/dist/layout/TabBar.svelte +39 -1
  38. package/dist/layout/Table.svelte +469 -443
  39. package/dist/layout/Tile.svelte +216 -291
  40. package/dist/misc/CodeInner.svelte +39 -1
  41. package/dist/misc/Progress.svelte +217 -292
  42. package/dist/misc/Tag.svelte +39 -1
  43. package/dist/overlays/Dialog.svelte +217 -292
  44. package/dist/overlays/Tooltip.svelte +267 -349
  45. package/dist/sass/_responsive.scss +15 -0
  46. package/dist/sass/_typography.scss +203 -191
  47. package/dist/typography/TextLayout.svelte +494 -292
  48. package/dist/vars/defaults.css +258 -0
  49. package/dist/vars/typography-context.css +271 -0
  50. package/package.json +1 -1
@@ -1,3 +1,18 @@
1
+ /* The width at or below which a Sidebar swaps its grab-bar rail for the sheet
2
+ affordance -- a floating button that opens a panel over the content.
3
+
4
+ Page has to agree with Sidebar about this, because Page is what floats the
5
+ aside out of flow and reserves the strip of padding the sheet button sits
6
+ in. They used to disagree: Sidebar switched at 512px and Page at 600px,
7
+ which left a band between 513 and 600 where Page had already lifted the
8
+ aside out of the layout while the Sidebar inside it was still showing a
9
+ rail -- a grab bar floating on top of the content, which is the affordance
10
+ we deliberately avoid everywhere else.
11
+
12
+ One definition, used by both, so they cannot drift again. */
13
+ $sidebar-compact-max: 512px;
14
+ $sidebar-wide-min: 513px;
15
+
1
16
 
2
17
  /* Warning: because we define a fallback
3
18
  media query, the media query can override the container
@@ -49,47 +49,51 @@
49
49
  text-align: fn.var-no-fallbacks(--text-align, $prefixes...);
50
50
  }
51
51
 
52
- @mixin heading-box-props($prefixes...) {
53
- --_heading-color: #{fn.vars-fallback(fg, revert, $prefixes...)};
54
- color: var(--_heading-color);
55
- --_heading-background: #{fn.vars-fallback(bg, transparent, $prefixes...)};
56
- background: var(--_heading-background);
57
- --_heading-padding: #{fn.vars-fallback(padding, 0, $prefixes...)};
58
- padding: var(--_heading-padding);
59
- --_heading-border: #{fn.vars-fallback(border, none, $prefixes...)};
60
- border: var(--_heading-border);
61
- border-width: fn.prefixed-vars-optional(border-width, $prefixes...);
62
- border-style: fn.prefixed-vars-optional(border-style, $prefixes...);
63
- border-color: fn.prefixed-vars-optional(border-color, $prefixes...);
64
- --_heading-border-radius: #{fn.vars-fallback(border-radius, 0, $prefixes...)};
65
- border-radius: var(--_heading-border-radius);
66
- --_heading-box-shadow: #{fn.vars-fallback(box-shadow, none, $prefixes...)};
67
- box-shadow: var(--_heading-box-shadow);
52
+ /* Per-level heading (h1-h6) box/typography properties, resolved to PRIVATE,
53
+ inheriting custom properties (--_h1-color, --_h2-font-size, etc) rather than
54
+ assigned directly to a matched h1-h6 selector. Nothing in this file matches
55
+ an actual heading element anymore -- see typography-context.css (vars/), which
56
+ is the single, global, :where()-scoped rule that actually reads these vars
57
+ and applies them to real elements. That split is what lets a component
58
+ nested arbitrarily deep (through <article>, <Tile>, whatever) still get the
59
+ nearest ancestor's heading styling: these are ordinary inherited custom
60
+ properties, so DOM proximity decides which component's values apply, not
61
+ selector specificity or stylesheet order. See AGENTS-INTERNAL.md. */
62
+ @mixin heading-box-context-vars($var-prefix, $prefixes...) {
63
+ --_#{$var-prefix}-color: #{fn.vars-fallback(fg, revert, $prefixes...)};
64
+ --_#{$var-prefix}-background: #{fn.vars-fallback(bg, transparent, $prefixes...)};
65
+ --_#{$var-prefix}-padding: #{fn.vars-fallback(padding, 0, $prefixes...)};
66
+ --_#{$var-prefix}-border: #{fn.vars-fallback(border, none, $prefixes...)};
67
+ --_#{$var-prefix}-border-width: #{fn.prefixed-vars-optional(border-width, $prefixes...)};
68
+ --_#{$var-prefix}-border-style: #{fn.prefixed-vars-optional(border-style, $prefixes...)};
69
+ --_#{$var-prefix}-border-color: #{fn.prefixed-vars-optional(border-color, $prefixes...)};
70
+ --_#{$var-prefix}-border-radius: #{fn.vars-fallback(border-radius, 0, $prefixes...)};
71
+ --_#{$var-prefix}-box-shadow: #{fn.vars-fallback(box-shadow, none, $prefixes...)};
68
72
  }
69
73
 
70
- @mixin heading-typography-props($prefixes...) {
71
- font-family: fn.var-with-fallbacks(--font-family, list.append($prefixes, revert)...);
72
- text-transform: fn.var-with-fallbacks(
73
- --text-transform,
74
- list.append($prefixes, revert)...
75
- );
76
- text-decoration: fn.var-with-fallbacks(
77
- --text-decoration,
78
- list.append($prefixes, revert)...
79
- );
80
- font-size: fn.vars-fallback(font-size, revert, $prefixes...);
81
- font-weight: fn.var-with-fallbacks(--font-weight, list.append($prefixes, revert)...);
82
- line-height: fn.var-with-fallbacks(--line-height, list.append($prefixes, revert)...);
83
- letter-spacing: fn.var-with-fallbacks(
84
- --letter-spacing,
85
- list.append($prefixes, revert)...
86
- );
87
- text-indent: fn.var-with-fallbacks(--indent, list.append($prefixes, revert)...);
88
- font-variant: fn.var-with-fallbacks(--font-variant, list.append($prefixes, revert)...);
89
- text-align: fn.var-with-fallbacks(--text-align, list.append($prefixes, revert)...);
74
+ @mixin heading-typography-context-vars($var-prefix, $prefixes...) {
75
+ --_#{$var-prefix}-font-family: #{fn.var-with-fallbacks(--font-family, list.append($prefixes, revert)...)};
76
+ --_#{$var-prefix}-text-transform: #{fn.var-with-fallbacks(
77
+ --text-transform,
78
+ list.append($prefixes, revert)...
79
+ )};
80
+ --_#{$var-prefix}-text-decoration: #{fn.var-with-fallbacks(
81
+ --text-decoration,
82
+ list.append($prefixes, revert)...
83
+ )};
84
+ --_#{$var-prefix}-font-size: #{fn.vars-fallback(font-size, revert, $prefixes...)};
85
+ --_#{$var-prefix}-font-weight: #{fn.var-with-fallbacks(--font-weight, list.append($prefixes, revert)...)};
86
+ --_#{$var-prefix}-line-height: #{fn.var-with-fallbacks(--line-height, list.append($prefixes, revert)...)};
87
+ --_#{$var-prefix}-letter-spacing: #{fn.var-with-fallbacks(
88
+ --letter-spacing,
89
+ list.append($prefixes, revert)...
90
+ )};
91
+ --_#{$var-prefix}-text-indent: #{fn.var-with-fallbacks(--indent, list.append($prefixes, revert)...)};
92
+ --_#{$var-prefix}-font-variant: #{fn.var-with-fallbacks(--font-variant, list.append($prefixes, revert)...)};
93
+ --_#{$var-prefix}-text-align: #{fn.var-with-fallbacks(--text-align, list.append($prefixes, revert)...)};
90
94
  }
91
95
 
92
- @mixin heading-props-for($level, $group, $prefixes...) {
96
+ @mixin heading-context-vars-for($var-prefix, $level, $group, $prefixes...) {
93
97
  $level-prefixes: fn.map-prefixes($level, $prefixes);
94
98
  $group-prefixes: fn.map-prefixes($group, $prefixes);
95
99
  $heading-prefixes: fn.map-prefixes(heading, $prefixes);
@@ -109,175 +113,183 @@
109
113
  $resolved-prefixes: list.append($resolved-prefixes, $group, $separator: comma);
110
114
  $resolved-prefixes: list.append($resolved-prefixes, heading, $separator: comma);
111
115
 
112
- @include heading-box-props($resolved-prefixes...);
113
- @include heading-typography-props($resolved-prefixes...);
116
+ @include heading-box-context-vars($var-prefix, $resolved-prefixes...);
117
+ @include heading-typography-context-vars($var-prefix, $resolved-prefixes...);
114
118
  }
115
119
 
116
- @mixin typography-container-props($prefixes...) {
117
- max-width: fn.var-with-fallbacks(--line-width, list.append($prefixes, unset)...);
118
- font-family: fn.var-with-fallbacks(
119
- --body-font-family,
120
- list.append($prefixes, var(--font-family))...
121
- );
120
+ /* All six heading levels' context vars in one call -- what every
121
+ "typography container" component (Container, Card, Tile, TextLayout, ...)
122
+ includes on itself once, alongside the shared --_heading-* vars below. */
123
+ @mixin heading-context-vars($prefixes...) {
124
+ @include heading-context-vars-for(h1, heading-1, heading-major, $prefixes...);
125
+ @include heading-context-vars-for(h2, heading-2, heading-major, $prefixes...);
126
+ @include heading-context-vars-for(h3, heading-3, heading, $prefixes...);
127
+ @include heading-context-vars-for(h4, heading-4, heading, $prefixes...);
128
+ @include heading-context-vars-for(h5, heading-5, heading-minor, $prefixes...);
129
+ @include heading-context-vars-for(h6, heading-6, heading-minor, $prefixes...);
130
+ }
122
131
 
123
- @include typography-props($prefixes...);
124
- & :global(p),
125
- :global(blockquote),
126
- :global(dl),
127
- :global(ul),
128
- :global(ol) {
129
- max-width: fn.var-with-fallbacks(--line-width, list.append($prefixes, 40em)...);
130
- font-family: fn.var-with-fallbacks(
132
+ /* Shared prose-measure group: p, blockquote, dl, ul, ol. li/dt/dd don't get
133
+ their own vars -- they're never wider than their ul/ol/dl parent's own
134
+ max-width box, so they're already bounded for free by ordinary block
135
+ layout, not by anything selector-based reaching them individually. */
136
+ @mixin prose-context-vars($prefixes...) {
137
+ --_prose-max-width: #{fn.var-with-fallbacks(--line-width, list.append($prefixes, 40em)...)};
138
+ --_prose-font-family: #{fn.var-with-fallbacks(
131
139
  --body-font-family,
132
140
  list.append($prefixes, var(--font-family))...
133
- );
134
- line-height: fn.var-with-fallbacks(
135
- --line-height,
136
- list.append($prefixes, 1.5)...
137
- );
138
- margin-left: auto;
139
- margin-right: auto;
140
- font-weight: fn.var-no-fallbacks(--body-font-weight, $prefixes...);
141
- }
142
- & :global(h1),
143
- :global(h2),
144
- :global(h3),
145
- :global(h4),
146
- :global(h5),
147
- :global(h6) {
148
- max-width: fn.var-with-fallbacks(--line-width, list.append($prefixes, unset)...);
149
- margin-left: auto;
150
- margin-right: auto;
151
- box-sizing: border-box;
152
- margin-bottom: fn.var-with-fallbacks(
153
- --heading-margin-bottom,
154
- list.append($prefixes, 0)...
155
- );
156
- margin-top: fn.var-with-fallbacks(
157
- --heading-margin-top,
158
- list.append($prefixes, 1.5em)...
159
- );
160
- }
161
-
162
- & :global(h1:first-child),
163
- :global(h2:first-child),
164
- :global(h3:first-child),
165
- :global(h4:first-child),
166
- :global(h5:first-child),
167
- :global(h6:first-child) {
168
- margin-top: fn.var-with-fallbacks(
169
- --first-heading-margin-top,
141
+ )};
142
+ --_prose-line-height: #{fn.var-with-fallbacks(--line-height, list.append($prefixes, 1.5)...)};
143
+ /* Start-aligned: a measure-capped paragraph in a Card or a Tile sits
144
+ against its container's leading edge like any other block. Centring the
145
+ measure is what a prose column asks for, and TextLayout -- the one
146
+ component that IS a prose column -- opts back in to `auto`. */
147
+ --_prose-margin-inline: #{fn.var-with-fallbacks(
148
+ --prose-margin-inline,
170
149
  list.append($prefixes, 0)...
171
- );
172
- }
173
-
174
- & :global(h1) {
175
- @include heading-props-for(heading-1, heading-major, $prefixes...);
176
- }
177
-
178
- & :global(h2) {
179
- @include heading-props-for(heading-2, heading-major, $prefixes...);
180
- }
181
-
182
- & :global(h3) {
183
- @include heading-props-for(heading-3, heading, $prefixes...);
184
- }
185
-
186
- & :global(h4) {
187
- @include heading-props-for(heading-4, heading, $prefixes...);
188
- }
150
+ )};
151
+ --_prose-font-weight: #{fn.var-no-fallbacks(--body-font-weight, $prefixes...)};
152
+ }
189
153
 
190
- & :global(h5) {
191
- @include heading-props-for(heading-5, heading-minor, $prefixes...);
192
- }
154
+ /* p specifically also gets the fuller typography-props-bare treatment
155
+ (paragraph-prefixed), which -- same as in the original selector-based
156
+ version -- is declared/consumed AFTER the shared prose vars above, so it
157
+ wins for whichever properties both groups set. */
158
+ @mixin paragraph-context-vars($prefixes...) {
159
+ $paragraph-prefixes: list.append(fn.map-prefixes(paragraph, $prefixes), paragraph);
160
+ --_paragraph-font-family: #{fn.vars(font-family, $paragraph-prefixes...)};
161
+ --_paragraph-text-transform: #{fn.vars(text-transform, $paragraph-prefixes...)};
162
+ --_paragraph-text-decoration: #{fn.vars(text-decoration, $paragraph-prefixes...)};
163
+ --_paragraph-font-size: #{fn.vars(font-size, $paragraph-prefixes...)};
164
+ --_paragraph-font-weight: #{fn.vars(font-weight, $paragraph-prefixes...)};
165
+ --_paragraph-line-height: #{fn.vars(line-height, $paragraph-prefixes...)};
166
+ --_paragraph-letter-spacing: #{fn.vars(letter-spacing, $paragraph-prefixes...)};
167
+ --_paragraph-text-indent: #{fn.vars(indent, $paragraph-prefixes...)};
168
+ --_paragraph-font-variant: #{fn.vars(font-variant, $paragraph-prefixes...)};
169
+ --_paragraph-text-align: #{fn.vars(text-align, $paragraph-prefixes...)};
170
+ }
193
171
 
194
- & :global(h6) {
195
- @include heading-props-for(heading-6, heading-minor, $prefixes...);
196
- }
172
+ /* The first paragraph in a typography context (p:first-of-type, or a p right
173
+ after a heading) gets its own, slightly different treatment -- larger lede
174
+ text, no top margin. Structural matching (:first-of-type, `h1 + p`) still
175
+ has to happen where the real element is, in the global consumer rule; only
176
+ the VALUES move to context vars here. */
177
+ @mixin first-paragraph-context-vars($prefixes...) {
178
+ $first-paragraph-prefixes: fn.map-prefixes(first-paragraph, $prefixes);
179
+ $paragraph-prefixes: list.append(fn.map-prefixes(paragraph, $prefixes), paragraph);
180
+ $first-paragraph-fallback-prefixes: $first-paragraph-prefixes;
197
181
 
198
- & :global(p) {
199
- @include typography-props-bare(
200
- list.append(fn.map-prefixes(paragraph, $prefixes), paragraph)...
182
+ @each $prefix in $paragraph-prefixes {
183
+ $first-paragraph-fallback-prefixes: list.append(
184
+ $first-paragraph-fallback-prefixes,
185
+ $prefix,
186
+ $separator: comma
201
187
  );
202
188
  }
203
- & :global(p:first-of-type),
204
- :global(h1 + p),
205
- :global(h2 + p),
206
- :global(h3 + p),
207
- :global(h4 + p),
208
- :global(h5 + p),
209
- :global(h6 + p) {
210
- $first-paragraph-prefixes: fn.map-prefixes(first-paragraph, $prefixes);
211
- $paragraph-prefixes: list.append(fn.map-prefixes(paragraph, $prefixes), paragraph);
212
- $first-paragraph-fallback-prefixes: $first-paragraph-prefixes;
213
189
 
214
- @each $prefix in $paragraph-prefixes {
215
- $first-paragraph-fallback-prefixes: list.append(
216
- $first-paragraph-fallback-prefixes,
217
- $prefix,
218
- $separator: comma
219
- );
220
- }
221
-
222
- @include typography-props-bare(
223
- list.append($first-paragraph-fallback-prefixes, first-paragraph)...
224
- );
225
- // var-with-fallbacks appends the base name to each prefix itself, so these
226
- // take the raw $prefixes -- pre-mapping them would double up on
227
- // "first-paragraph" (e.g. --body-first-paragraph-first-paragraph-font-size).
228
- font-size: fn.var-with-fallbacks(
190
+ --_first-paragraph-font-family: #{fn.vars(font-family, $first-paragraph-fallback-prefixes...)};
191
+ --_first-paragraph-text-transform: #{fn.vars(
192
+ text-transform,
193
+ $first-paragraph-fallback-prefixes...
194
+ )};
195
+ --_first-paragraph-text-decoration: #{fn.vars(
196
+ text-decoration,
197
+ $first-paragraph-fallback-prefixes...
198
+ )};
199
+ --_first-paragraph-font-weight: #{fn.vars(font-weight, $first-paragraph-fallback-prefixes...)};
200
+ --_first-paragraph-letter-spacing: #{fn.vars(
201
+ letter-spacing,
202
+ $first-paragraph-fallback-prefixes...
203
+ )};
204
+ --_first-paragraph-text-indent: #{fn.vars(indent, $first-paragraph-fallback-prefixes...)};
205
+ --_first-paragraph-font-variant: #{fn.vars(
206
+ font-variant,
207
+ $first-paragraph-fallback-prefixes...
208
+ )};
209
+ --_first-paragraph-text-align: #{fn.vars(text-align, $first-paragraph-fallback-prefixes...)};
210
+ // var-with-fallbacks appends the base name to each prefix itself, so these
211
+ // take the raw $prefixes -- pre-mapping them would double up on
212
+ // "first-paragraph" (e.g. --body-first-paragraph-first-paragraph-font-size).
213
+ --_first-paragraph-font-size: #{fn.var-with-fallbacks(
229
214
  --first-paragraph-font-size,
230
- list.append(
231
- $prefixes,
232
- fn.vars(
233
- font-size,
234
- list.append(fn.map-prefixes(paragraph, $prefixes), paragraph)...
235
- )
236
- )...
237
- );
238
- line-height: fn.var-with-fallbacks(
215
+ list.append($prefixes, fn.vars(font-size, $paragraph-prefixes...))...
216
+ )};
217
+ --_first-paragraph-line-height: #{fn.var-with-fallbacks(
239
218
  --first-paragraph-line-height,
240
- list.append(
241
- $prefixes,
242
- fn.vars(
243
- line-height,
244
- list.append(fn.map-prefixes(paragraph, $prefixes), paragraph)...
245
- )
246
- )...
247
- );
248
- margin-block-start: fn.var-with-fallbacks(
219
+ list.append($prefixes, fn.vars(line-height, $paragraph-prefixes...))...
220
+ )};
221
+ --_first-paragraph-margin-top: #{fn.var-with-fallbacks(
249
222
  --first-paragraph-margin-top,
250
223
  list.append($prefixes, 0)...
251
- );
252
- }
253
- & :global(p:first-of-type::first-line),
254
- :global(h1 + p::first-line),
255
- :global(h2 + p::first-line),
256
- :global(h3 + p::first-line),
257
- :global(h4 + p::first-line),
258
- :global(h5 + p::first-line),
259
- :global(h6 + p::first-line) {
260
- @include typography-props-bare(
261
- list.append(fn.map-prefixes-include-base(first-line, $prefixes), first-line)...
262
- );
263
- }
224
+ )};
225
+ }
264
226
 
265
- & :global(p:first-of-type::first-letter),
266
- :global(h1 + p::first-letter),
267
- :global(h2 + p::first-letter),
268
- :global(h3 + p::first-letter),
269
- :global(h4 + p::first-letter),
270
- :global(h5 + p::first-letter),
271
- :global(h6 + p::first-letter) {
272
- @include typography-props-bare(
273
- fn.map-prefixes-include-base(first-letter, $prefixes)...
274
- );
275
- --link-bg: #{fn.vars(link-bg, $prefixes...)};
276
- --link-fg: #{fn.vars(link-fg, $prefixes...)};
277
- background: #{fn.vars-suffix-fallback(first-letter-bg, $prefixes...)};
278
- color: #{fn.vars-suffix-fallback(first-letter-fg, $prefixes...)};
279
- float: var(--first-letter-float, none);
280
- margin-right: var(--first-letter-margin-right, 0);
281
- padding-top: var(--first-letter-padding-top, 0);
282
- }
227
+ @mixin first-line-context-vars($prefixes...) {
228
+ $resolved: list.append(fn.map-prefixes-include-base(first-line, $prefixes), first-line);
229
+ --_first-line-font-family: #{fn.vars(font-family, $resolved...)};
230
+ --_first-line-text-transform: #{fn.vars(text-transform, $resolved...)};
231
+ --_first-line-text-decoration: #{fn.vars(text-decoration, $resolved...)};
232
+ --_first-line-font-size: #{fn.vars(font-size, $resolved...)};
233
+ --_first-line-font-weight: #{fn.vars(font-weight, $resolved...)};
234
+ --_first-line-line-height: #{fn.vars(line-height, $resolved...)};
235
+ --_first-line-letter-spacing: #{fn.vars(letter-spacing, $resolved...)};
236
+ --_first-line-text-indent: #{fn.vars(indent, $resolved...)};
237
+ --_first-line-font-variant: #{fn.vars(font-variant, $resolved...)};
238
+ --_first-line-text-align: #{fn.vars(text-align, $resolved...)};
239
+ }
240
+
241
+ @mixin first-letter-context-vars($prefixes...) {
242
+ $resolved: fn.map-prefixes-include-base(first-letter, $prefixes);
243
+ --_first-letter-font-family: #{fn.vars(font-family, $resolved...)};
244
+ --_first-letter-text-transform: #{fn.vars(text-transform, $resolved...)};
245
+ --_first-letter-text-decoration: #{fn.vars(text-decoration, $resolved...)};
246
+ --_first-letter-font-size: #{fn.vars(font-size, $resolved...)};
247
+ --_first-letter-font-weight: #{fn.vars(font-weight, $resolved...)};
248
+ --_first-letter-line-height: #{fn.vars(line-height, $resolved...)};
249
+ --_first-letter-letter-spacing: #{fn.vars(letter-spacing, $resolved...)};
250
+ --_first-letter-text-indent: #{fn.vars(indent, $resolved...)};
251
+ --_first-letter-font-variant: #{fn.vars(font-variant, $resolved...)};
252
+ --_first-letter-text-align: #{fn.vars(text-align, $resolved...)};
253
+ --_first-letter-link-bg: #{fn.vars(link-bg, $prefixes...)};
254
+ --_first-letter-link-fg: #{fn.vars(link-fg, $prefixes...)};
255
+ --_first-letter-background: #{fn.vars-suffix-fallback(first-letter-bg, $prefixes...)};
256
+ --_first-letter-color: #{fn.vars-suffix-fallback(first-letter-fg, $prefixes...)};
257
+ }
258
+
259
+ @mixin typography-container-props($prefixes...) {
260
+ max-width: fn.var-with-fallbacks(--line-width, list.append($prefixes, unset)...);
261
+ font-family: fn.var-with-fallbacks(
262
+ --body-font-family,
263
+ list.append($prefixes, var(--font-family))...
264
+ );
265
+
266
+ @include typography-props($prefixes...);
267
+ @include prose-context-vars($prefixes...);
268
+ @include paragraph-context-vars($prefixes...);
269
+ @include first-paragraph-context-vars($prefixes...);
270
+ @include first-line-context-vars($prefixes...);
271
+ @include first-letter-context-vars($prefixes...);
272
+ /* Private context vars only -- consumed once, globally, by the :where()
273
+ rule in vars/typography-context.css, not by a selector matching h1-h6 here.
274
+ See the comment above heading-box-context-vars(). */
275
+ --_heading-max-width: #{fn.var-with-fallbacks(--line-width, list.append($prefixes, unset)...)};
276
+ /* Same as --_prose-margin-inline: start-aligned in a container, centred
277
+ only by TextLayout. */
278
+ --_heading-margin-inline: #{fn.var-with-fallbacks(
279
+ --heading-margin-inline,
280
+ list.append($prefixes, 0)...
281
+ )};
282
+ --_heading-margin-bottom: #{fn.var-with-fallbacks(
283
+ --heading-margin-bottom,
284
+ list.append($prefixes, 0)...
285
+ )};
286
+ --_heading-margin-top: #{fn.var-with-fallbacks(
287
+ --heading-margin-top,
288
+ list.append($prefixes, 1.5em)...
289
+ )};
290
+ --_heading-first-margin-top: #{fn.var-with-fallbacks(
291
+ --first-heading-margin-top,
292
+ list.append($prefixes, 0)...
293
+ )};
294
+ @include heading-context-vars($prefixes...);
283
295
  }