contain-css-svelte 1.3.0 → 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.
- package/dist/Card.svelte +204 -288
- package/dist/controls/Button.svelte +27 -1
- package/dist/controls/ButtonLink.svelte +27 -1
- package/dist/controls/Checkbox.svelte +26 -0
- package/dist/controls/CircleButton.svelte +27 -1
- package/dist/controls/Input.svelte +27 -1
- package/dist/controls/RadioButton.svelte +26 -0
- package/dist/controls/Select.svelte +26 -0
- package/dist/controls/Slider.svelte +27 -1
- package/dist/controls/TabItem.svelte +27 -1
- package/dist/controls/Toggle.svelte +27 -1
- package/dist/dropdowns/DropdownMenu.svelte +27 -1
- package/dist/layout/Accordion.svelte +27 -1
- package/dist/layout/Bar.svelte +37 -1
- package/dist/layout/ColumnContainer.svelte +27 -1
- package/dist/layout/Columns.svelte +27 -1
- package/dist/layout/Container.svelte +205 -292
- package/dist/layout/DataList.svelte +27 -1
- package/dist/layout/DataListItem.svelte +205 -292
- package/dist/layout/Fieldset.svelte +27 -1
- package/dist/layout/Form.svelte +205 -292
- package/dist/layout/FormItem.svelte +27 -1
- package/dist/layout/GridLayout.svelte +26 -0
- package/dist/layout/Hero.svelte +205 -292
- package/dist/layout/Inline.svelte +33 -1
- package/dist/layout/MenuList.svelte +27 -1
- package/dist/layout/Page.svelte +27 -1
- package/dist/layout/RowContainer.svelte +27 -1
- package/dist/layout/Sidebar.svelte +266 -33
- package/dist/layout/Sidebar.svelte.d.ts +34 -0
- package/dist/layout/SidebarContainer.svelte +27 -1
- package/dist/layout/SplitPane.svelte +27 -1
- package/dist/layout/Stack.svelte +33 -1
- package/dist/layout/TabBar.svelte +27 -1
- package/dist/layout/Table.svelte +238 -294
- package/dist/layout/Tile.svelte +204 -291
- package/dist/misc/CodeInner.svelte +27 -1
- package/dist/misc/Progress.svelte +205 -292
- package/dist/misc/Tag.svelte +27 -1
- package/dist/overlays/Dialog.svelte +205 -292
- package/dist/overlays/Tooltip.svelte +255 -349
- package/dist/sass/_typography.scss +203 -191
- package/dist/typography/TextLayout.svelte +482 -292
- package/dist/vars/defaults.css +258 -0
- package/dist/vars/typography-context.css +271 -0
- package/package.json +1 -1
|
@@ -49,47 +49,51 @@
|
|
|
49
49
|
text-align: fn.var-no-fallbacks(--text-align, $prefixes...);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
--
|
|
65
|
-
|
|
66
|
-
--
|
|
67
|
-
|
|
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-
|
|
71
|
-
font-family: fn.var-with-fallbacks(--font-family, list.append($prefixes, revert)...);
|
|
72
|
-
text-transform: fn.var-with-fallbacks(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
text-decoration: fn.var-with-fallbacks(
|
|
77
|
-
|
|
78
|
-
|
|
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
|
-
|
|
85
|
-
|
|
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-
|
|
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-
|
|
113
|
-
@include heading-typography-
|
|
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
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
:
|
|
129
|
-
|
|
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
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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
|
-
|
|
191
|
-
|
|
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
|
-
|
|
195
|
-
|
|
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
|
-
|
|
199
|
-
|
|
200
|
-
|
|
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
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
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
|
-
|
|
232
|
-
|
|
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
|
-
|
|
242
|
-
|
|
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
|
-
|
|
266
|
-
:
|
|
267
|
-
:
|
|
268
|
-
:
|
|
269
|
-
:
|
|
270
|
-
:
|
|
271
|
-
:
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
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
|
}
|