css-tags 0.1.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/LICENSE +21 -0
- package/README.md +875 -0
- package/carousel.js +86 -0
- package/components/accessibility.css +51 -0
- package/components/actions.css +76 -0
- package/components/alert.css +122 -0
- package/components/application-patterns.css +122 -0
- package/components/badge.css +125 -0
- package/components/box-extra.css +220 -0
- package/components/box.css +75 -0
- package/components/card.css +130 -0
- package/components/carousel.css +76 -0
- package/components/chip.css +71 -0
- package/components/container.css +55 -0
- package/components/content-patterns.css +234 -0
- package/components/disclosure.css +581 -0
- package/components/divider.css +68 -0
- package/components/flex.css +59 -0
- package/components/form-patterns.css +273 -0
- package/components/form.css +130 -0
- package/components/grid.css +82 -0
- package/components/identity.css +59 -0
- package/components/img-container.css +141 -0
- package/components/img-container.js +75 -0
- package/components/list.css +69 -0
- package/components/loading.css +112 -0
- package/components/masonry.css +48 -0
- package/components/modal.css +73 -0
- package/components/navigation-patterns.css +245 -0
- package/components/navigation.css +200 -0
- package/components/popover.css +49 -0
- package/components/site-shell.css +180 -0
- package/components/status.css +110 -0
- package/components/table.css +98 -0
- package/components/tabs.css +103 -0
- package/components/tooltip.css +87 -0
- package/components/tooltips.css +73 -0
- package/components/view-transition.css +73 -0
- package/core/base.css +62 -0
- package/core/defaults.css +490 -0
- package/core/engine.css +32 -0
- package/core/mixins.css +376 -0
- package/core/palette-accent.css +8 -0
- package/core/palette-base.css +107 -0
- package/core/palette-extended.css +142 -0
- package/core/palette-feedback.css +62 -0
- package/core/palette.css +7 -0
- package/core/reset.css +270 -0
- package/core/text.css +171 -0
- package/core/theme.css +608 -0
- package/core/tokens.css +488 -0
- package/core/typography.css +327 -0
- package/index.css +66 -0
- package/layouts/layout-extra.css +204 -0
- package/layouts/layout-extras-helpers.css +19 -0
- package/layouts/layout.css +348 -0
- package/package.json +66 -0
- package/theme-generator.css +979 -0
- package/themes/example-brand.css +59 -0
- package/themes/theme-packs.css +31 -0
- package/types/css-tags.d.ts +482 -0
- package/utilities/utilities.css +564 -0
- package/view-transition.js +111 -0
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* typography.css
|
|
3
|
+
*
|
|
4
|
+
* Semantic typography, long-form prose rhythm, and callout surfaces.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* Opt into container-relative fluid type. Descendants keep the same bounded
|
|
9
|
+
* scale, but their preferred sizes respond to this container instead of the
|
|
10
|
+
* viewport. The short `.fc` alias is provided for composition-heavy markup.
|
|
11
|
+
*/
|
|
12
|
+
:is(fluid-container, [data-fluid-container], .fluid-container, .fc) {
|
|
13
|
+
display: block;
|
|
14
|
+
container-type: inline-size;
|
|
15
|
+
--font-size-step-1-preferred: calc(1.02rem + 0.22cqi);
|
|
16
|
+
--font-size-step-2-preferred: calc(1.11rem + 0.4cqi);
|
|
17
|
+
--font-size-step-3-preferred: calc(1.22rem + 0.75cqi);
|
|
18
|
+
--font-size-step-4-preferred: calc(1.32rem + 1.25cqi);
|
|
19
|
+
--font-size-step-5-preferred: calc(1.5rem + 1.9cqi);
|
|
20
|
+
--font-size-step-6-preferred: calc(1.8rem + 2.8cqi);
|
|
21
|
+
--font-size-step-7-preferred: calc(2.1rem + 3.6cqi);
|
|
22
|
+
--font-size-step-1: clamp(var(--font-size-step-1-min), var(--font-size-step-1-preferred), var(--font-size-step-1-max));
|
|
23
|
+
--font-size-step-2: clamp(var(--font-size-step-2-min), var(--font-size-step-2-preferred), var(--font-size-step-2-max));
|
|
24
|
+
--font-size-step-3: clamp(var(--font-size-step-3-min), var(--font-size-step-3-preferred), var(--font-size-step-3-max));
|
|
25
|
+
--font-size-step-4: clamp(var(--font-size-step-4-min), var(--font-size-step-4-preferred), var(--font-size-step-4-max));
|
|
26
|
+
--font-size-step-5: clamp(var(--font-size-step-5-min), var(--font-size-step-5-preferred), var(--font-size-step-5-max));
|
|
27
|
+
--font-size-step-6: clamp(var(--font-size-step-6-min), var(--font-size-step-6-preferred), var(--font-size-step-6-max));
|
|
28
|
+
--font-size-step-7: clamp(var(--font-size-step-7-min), var(--font-size-step-7-preferred), var(--font-size-step-7-max));
|
|
29
|
+
--font-size-lg: var(--font-size-step-1);
|
|
30
|
+
--font-size-xl: var(--font-size-step-2);
|
|
31
|
+
--font-size-2xl: var(--font-size-step-3);
|
|
32
|
+
--font-size-3xl: var(--font-size-step-4);
|
|
33
|
+
--font-size-4xl: var(--font-size-step-5);
|
|
34
|
+
--font-size-5xl: var(--font-size-step-6);
|
|
35
|
+
--font-size-6xl: var(--font-size-step-7);
|
|
36
|
+
--font-size-body-lg: var(--font-size-lg);
|
|
37
|
+
--font-size-lead: var(--font-size-xl);
|
|
38
|
+
--font-size-h1: var(--font-size-6xl);
|
|
39
|
+
--font-size-h2: var(--font-size-5xl);
|
|
40
|
+
--font-size-h3: var(--font-size-4xl);
|
|
41
|
+
--font-size-h4: var(--font-size-3xl);
|
|
42
|
+
--font-size-h5: var(--font-size-2xl);
|
|
43
|
+
--font-size-h6: var(--font-size-lg);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:is(.lead, [data-lead], text[variant="lead"]) {
|
|
47
|
+
--_fs: var(--font-size-lead);
|
|
48
|
+
--_lh: var(--line-height-lead);
|
|
49
|
+
display: block;
|
|
50
|
+
color: var(--text-subtle);
|
|
51
|
+
font-size: var(--font-size-lead);
|
|
52
|
+
line-height: var(--line-height-lead);
|
|
53
|
+
max-inline-size: var(--measure-prose, var(--measure-body));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:is(.caption, [data-caption], text[variant="caption"]) {
|
|
57
|
+
--_fs: var(--font-size-caption);
|
|
58
|
+
display: block;
|
|
59
|
+
color: var(--text-muted);
|
|
60
|
+
font-size: var(--font-size-meta, var(--font-size-caption));
|
|
61
|
+
line-height: var(--line-height-meta, var(--line-height-normal));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:is(eyebrow, .eyebrow, [data-eyebrow], text[variant="eyebrow"]) {
|
|
65
|
+
--_fs: var(--font-size-sm);
|
|
66
|
+
--_fw: var(--font-weight-semibold);
|
|
67
|
+
--_tracking: var(--letter-spacing-eyebrow, var(--letter-spacing-widest));
|
|
68
|
+
display: block;
|
|
69
|
+
margin-block-end: var(--space-eyebrow-bottom, 0.5rem);
|
|
70
|
+
color: var(--text-accent, var(--accent));
|
|
71
|
+
font-size: var(--font-size-sm);
|
|
72
|
+
font-weight: var(--font-weight-semibold);
|
|
73
|
+
line-height: var(--line-height-tight);
|
|
74
|
+
letter-spacing: var(--letter-spacing-eyebrow, var(--letter-spacing-widest));
|
|
75
|
+
text-transform: uppercase;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:is(.prose, [data-prose]) {
|
|
79
|
+
max-inline-size: var(--measure-prose, var(--measure-body));
|
|
80
|
+
font-family: var(--font-family-body, inherit);
|
|
81
|
+
font-size: var(--font-size-prose, var(--font-size-body));
|
|
82
|
+
line-height: var(--line-height-prose, var(--line-height-body));
|
|
83
|
+
overflow-wrap: break-word;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:is(.prose-compact, [data-prose="compact"]) {
|
|
87
|
+
--space-flow: 0.75em;
|
|
88
|
+
--space-heading-top: 1.4em;
|
|
89
|
+
--space-rich-block: 1.1em;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:is(.prose-wide, [data-prose="wide"], [data-prose-width="wide"]) {
|
|
93
|
+
max-inline-size: var(--measure-wide);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:is(.prose-unbounded, [data-prose="unbounded"], [data-prose-width="none"]) {
|
|
97
|
+
max-inline-size: none;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:is(.prose, [data-prose]) > * {
|
|
101
|
+
margin-block: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
:is(.prose, [data-prose]) > * + * {
|
|
105
|
+
margin-block-start: var(--space-flow, 1em);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:is(.prose, [data-prose]) > :is(h2, h3, h4, h5, h6) {
|
|
109
|
+
margin-block-start: var(--space-heading-top, 1.8em);
|
|
110
|
+
margin-block-end: var(--space-heading-bottom, 0.65em);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:is(.prose, [data-prose]) > :is(h1, h2, h3, h4, h5, h6) + :is(p, ul, ol) {
|
|
114
|
+
margin-block-start: 0;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
:is(.prose, [data-prose]) :is(ul, ol) {
|
|
118
|
+
padding-inline-start: var(--space-list-indent, 1.5em);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
:is(.prose, [data-prose]) :is(li > ul, li > ol) {
|
|
122
|
+
margin-block-start: var(--space-list-item, 0.5em);
|
|
123
|
+
margin-block-end: 0;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
:is(.prose, [data-prose]) a {
|
|
127
|
+
overflow-wrap: var(--prose-link-wrap, anywhere);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
:is(.prose, [data-prose]) :is(pre, figure, blockquote, hr, .callout, [data-callout]) {
|
|
131
|
+
margin-block: var(--space-rich-block, 1.5em);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
:is(.prose, [data-prose]) img {
|
|
135
|
+
max-inline-size: 100%;
|
|
136
|
+
block-size: auto;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
:is(.prose, [data-prose]) :is(video, iframe, svg) {
|
|
140
|
+
max-inline-size: 100%;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
:is(.prose, [data-prose]) iframe {
|
|
144
|
+
inline-size: 100%;
|
|
145
|
+
min-block-size: var(--prose-embed-min-height, 18rem);
|
|
146
|
+
border: 0;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
:is(.prose, [data-prose]) figure > :is(img, picture, video, iframe) {
|
|
150
|
+
display: block;
|
|
151
|
+
margin-inline: auto;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* Markdown and CMS output cannot always add the preferred data-table wrapper. */
|
|
155
|
+
:is(.prose, [data-prose]) > table {
|
|
156
|
+
display: block;
|
|
157
|
+
max-inline-size: 100%;
|
|
158
|
+
overflow-x: auto;
|
|
159
|
+
overscroll-behavior-inline: contain;
|
|
160
|
+
scrollbar-gutter: var(--prose-table-scrollbar-gutter, stable);
|
|
161
|
+
scrollbar-width: var(--prose-table-scrollbar-width, thin);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:is(.prose, [data-prose]) :not(pre) > code {
|
|
165
|
+
overflow-wrap: var(--prose-inline-code-wrap, anywhere);
|
|
166
|
+
word-break: var(--prose-inline-code-word-break, normal);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
:is(.prose, [data-prose]) figcaption {
|
|
170
|
+
margin-block-start: var(--space-figure-caption-top, 0.5rem);
|
|
171
|
+
color: var(--text-muted);
|
|
172
|
+
font-size: var(--font-size-caption);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
:is(.prose, [data-prose]) table > caption {
|
|
176
|
+
padding-block: var(--prose-table-caption-padding, 0 0.75em);
|
|
177
|
+
color: var(--prose-table-caption-color, var(--text-muted));
|
|
178
|
+
font-size: var(--prose-table-caption-font-size, var(--font-size-caption));
|
|
179
|
+
text-align: start;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
:is(.prose, [data-prose]) :is(dt, dd) {
|
|
183
|
+
min-inline-size: 0;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
:is(.prose, [data-prose]) dt:not(:first-child) {
|
|
187
|
+
margin-block-start: var(--prose-definition-term-gap, 1em);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
:is(.prose, [data-prose]) dd {
|
|
191
|
+
margin-block-start: var(--prose-definition-gap, 0.35em);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
:is(.prose, [data-prose]) blockquote > :is(footer, cite) {
|
|
195
|
+
display: block;
|
|
196
|
+
margin-block-start: var(--prose-quote-cite-gap, 0.75em);
|
|
197
|
+
color: var(--prose-quote-cite-color, var(--text-muted));
|
|
198
|
+
font-size: var(--prose-quote-cite-font-size, var(--font-size-sm));
|
|
199
|
+
font-style: normal;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
:is(.prose, [data-prose]) blockquote > footer::before {
|
|
203
|
+
content: var(--prose-quote-cite-prefix, "— ");
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/* GitHub, CommonMark, and many CMS renderers use these task-list hooks. */
|
|
207
|
+
:is(.prose, [data-prose]) :is(.contains-task-list, [data-task-list]) {
|
|
208
|
+
list-style: none;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
:is(.prose, [data-prose]) :is(.task-list-item, [data-task-list-item]) {
|
|
212
|
+
list-style: none;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
:is(.prose, [data-prose]) :is(.task-list-item, [data-task-list-item])
|
|
216
|
+
> input[type="checkbox"]:first-child {
|
|
217
|
+
inline-size: 1em;
|
|
218
|
+
block-size: 1em;
|
|
219
|
+
margin-inline-start: calc(-1 * var(--prose-task-marker-offset, 1.5em));
|
|
220
|
+
margin-inline-end: var(--prose-task-gap, 0.6em);
|
|
221
|
+
opacity: 1;
|
|
222
|
+
vertical-align: -0.1em;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/* Footnote output used by remark/rehype, GitHub, and compatible CMS engines. */
|
|
226
|
+
:is(.prose, [data-prose]) :is([data-footnotes], .footnotes) {
|
|
227
|
+
display: grid;
|
|
228
|
+
gap: var(--prose-footnotes-gap, 0.75em);
|
|
229
|
+
margin-block-start: var(--space-rich-block, 1.5em);
|
|
230
|
+
padding-block-start: var(--prose-footnotes-padding-block-start, 1.5em);
|
|
231
|
+
border-block-start: var(--prose-footnotes-border, 1px solid var(--outline-subtle));
|
|
232
|
+
color: var(--prose-footnotes-color, var(--text-subtle));
|
|
233
|
+
font-size: var(--prose-footnotes-font-size, var(--font-size-sm));
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
:is(.prose, [data-prose]) :is([data-footnotes], .footnotes) > * {
|
|
237
|
+
margin-block: 0;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
:is(.prose, [data-prose]) :is([data-footnotes], .footnotes) li:target {
|
|
241
|
+
border-radius: var(--radius-sm);
|
|
242
|
+
background: var(--prose-footnote-target-background, var(--highlight-bg-subtle));
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
:is(.prose, [data-prose]) :is([data-footnote-ref], [data-footnote-backref]) {
|
|
246
|
+
font-weight: var(--font-weight-medium);
|
|
247
|
+
text-decoration: none;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
:is(.prose, [data-prose]) [data-footnote-backref] {
|
|
251
|
+
margin-inline-start: var(--prose-footnote-backref-gap, 0.25em);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
:is(.prose, [data-prose]) :is(h1, h2, h3, h4, h5, h6, [id]) {
|
|
255
|
+
scroll-margin-block-start: var(--prose-heading-scroll-margin, 2rem);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
:is(.prose, [data-prose]) :is(h1, h2, h3, h4, h5, h6)
|
|
259
|
+
> :is(.heading-anchor__link, [data-heading-anchor]) {
|
|
260
|
+
display: inline-flex;
|
|
261
|
+
margin-inline-start: var(--prose-heading-anchor-gap, 0.35em);
|
|
262
|
+
color: var(--prose-heading-anchor-color, var(--accent));
|
|
263
|
+
font-size: 0.55em;
|
|
264
|
+
line-height: 1;
|
|
265
|
+
opacity: var(--prose-heading-anchor-opacity, 0);
|
|
266
|
+
vertical-align: middle;
|
|
267
|
+
transition: opacity var(--transition-duration, 150ms) var(--transition-timing, ease-out);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
:is(.prose, [data-prose]) :is(h1, h2, h3, h4, h5, h6):is(:hover, :focus-within)
|
|
271
|
+
> :is(.heading-anchor__link, [data-heading-anchor]),
|
|
272
|
+
:is(.prose, [data-prose]) :is(.heading-anchor__link, [data-heading-anchor]):focus-visible {
|
|
273
|
+
opacity: var(--prose-heading-anchor-visible-opacity, 0.75);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
:is(.prose, [data-prose]) > details {
|
|
277
|
+
margin-block: var(--prose-details-margin, var(--space-rich-block, 1.5em));
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
@media (hover: none) {
|
|
281
|
+
:is(.prose, [data-prose]) :is(h1, h2, h3, h4, h5, h6)
|
|
282
|
+
> :is(.heading-anchor__link, [data-heading-anchor]) {
|
|
283
|
+
opacity: var(--prose-heading-anchor-touch-opacity, 0.55);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
:is(.prose, [data-prose]) mark {
|
|
288
|
+
padding-inline: 0.15em;
|
|
289
|
+
background: var(--highlight-bg-overt, mark);
|
|
290
|
+
color: var(--text-overt, marktext);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
:is(.prose, [data-prose]) abbr[title] {
|
|
294
|
+
text-decoration-style: dotted;
|
|
295
|
+
text-underline-offset: 0.15em;
|
|
296
|
+
cursor: help;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
:is(.callout, [data-callout]) {
|
|
300
|
+
--_callout-accent: var(--callout-border, var(--info));
|
|
301
|
+
--_callout-bg: var(--callout-background, var(--surface-subtle));
|
|
302
|
+
|
|
303
|
+
padding: var(--space-callout-pad-y, 1rem) var(--space-callout-pad-x, 1rem);
|
|
304
|
+
border: var(--border-width, 1px) solid var(--_callout-accent);
|
|
305
|
+
border-inline-start-width: var(--callout-border-width, 0.3rem);
|
|
306
|
+
border-radius: var(--callout-radius, var(--radius-md));
|
|
307
|
+
background: var(--_callout-bg);
|
|
308
|
+
color: var(--text-default);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
:is(.callout-info, [data-callout="info"]) { --_callout-accent: var(--callout-info-border, var(--info)); }
|
|
312
|
+
:is(.callout-success, [data-callout="success"]) { --_callout-accent: var(--callout-success-border, var(--success)); }
|
|
313
|
+
:is(.callout-warning, [data-callout="warning"]) { --_callout-accent: var(--callout-warning-border, var(--warning)); }
|
|
314
|
+
:is(.callout-error, [data-callout="error"]) { --_callout-accent: var(--callout-error-border, var(--error)); }
|
|
315
|
+
|
|
316
|
+
:is(.callout-title, [data-callout-title]) {
|
|
317
|
+
display: block;
|
|
318
|
+
margin-block-end: var(--space-xs, 0.5rem);
|
|
319
|
+
color: var(--text-overt);
|
|
320
|
+
font-weight: var(--font-weight-semibold);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
@supports (text-box: trim-both cap alphabetic) {
|
|
324
|
+
:is(eyebrow, .eyebrow, [data-eyebrow], text[variant="eyebrow"]) {
|
|
325
|
+
text-box: var(--text-box-eyebrow, var(--text-box-ui));
|
|
326
|
+
}
|
|
327
|
+
}
|
package/index.css
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modern CSS Framework - Main Entry Point
|
|
3
|
+
* Revised import structure for clarity and correctness.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@layer base, reset, tokens, engine, theme, palette, defaults, components, utilities, layouts, website-theme;
|
|
7
|
+
|
|
8
|
+
/* CORE SYSTEM */
|
|
9
|
+
@import url("core/reset.css") layer(reset);
|
|
10
|
+
@import url("core/tokens.css") layer(tokens);
|
|
11
|
+
@import url("core/engine.css") layer(engine);
|
|
12
|
+
@import url("core/theme.css") layer(theme); /* The new canonical theme file */
|
|
13
|
+
@import url("core/palette.css") layer(palette);
|
|
14
|
+
@import url('core/base.css') layer(base);
|
|
15
|
+
@import url('core/defaults.css') layer(defaults); /* Restored for semantic styling */
|
|
16
|
+
@import url('core/typography.css') layer(defaults);
|
|
17
|
+
@import url('core/mixins.css') layer(base);
|
|
18
|
+
@import url('core/text.css') layer(components);
|
|
19
|
+
/* THEMES */
|
|
20
|
+
@import url("themes/theme-packs.css") layer(theme);
|
|
21
|
+
@import url("themes/example-brand.css") layer(theme);
|
|
22
|
+
|
|
23
|
+
/* LAYOUTS & UTILITIES */
|
|
24
|
+
@import url("utilities/utilities.css") layer(utilities); /* The new canonical utilities file */
|
|
25
|
+
@import url("layouts/layout.css") layer(layouts);
|
|
26
|
+
@import url("layouts/layout-extra.css") layer(layouts);
|
|
27
|
+
@import url("layouts/layout-extras-helpers.css") layer(layouts);
|
|
28
|
+
|
|
29
|
+
/* COMPONENTS */
|
|
30
|
+
@import url('components/accessibility.css') layer(components);
|
|
31
|
+
@import url('components/container.css') layer(components);
|
|
32
|
+
@import url('components/grid.css') layer(components);
|
|
33
|
+
@import url('components/flex.css') layer(components);
|
|
34
|
+
@import url('components/card.css') layer(components);
|
|
35
|
+
@import url('components/box.css') layer(components);
|
|
36
|
+
@import url('components/box-extra.css') layer(components);
|
|
37
|
+
@import url('components/badge.css') layer(components);
|
|
38
|
+
@import url('components/chip.css') layer(components);
|
|
39
|
+
@import url('components/alert.css') layer(components);
|
|
40
|
+
@import url('components/modal.css') layer(components);
|
|
41
|
+
@import url('components/tooltip.css') layer(components);
|
|
42
|
+
@import url('components/tooltips.css') layer(components);
|
|
43
|
+
@import url('components/list.css') layer(components);
|
|
44
|
+
@import url('components/divider.css') layer(components);
|
|
45
|
+
@import url('components/carousel.css') layer(components);
|
|
46
|
+
@import url('components/popover.css') layer(components);
|
|
47
|
+
@import url('components/disclosure.css') layer(components);
|
|
48
|
+
@import url('components/tabs.css') layer(components);
|
|
49
|
+
@import url('components/loading.css') layer(components);
|
|
50
|
+
@import url('components/status.css') layer(components);
|
|
51
|
+
@import url('components/view-transition.css') layer(components); /* Corrected path */
|
|
52
|
+
@import url('components/table.css') layer(components);
|
|
53
|
+
@import url('components/form.css') layer(components);
|
|
54
|
+
@import url('components/actions.css') layer(components);
|
|
55
|
+
@import url('components/form-patterns.css') layer(components);
|
|
56
|
+
@import url('components/identity.css') layer(components);
|
|
57
|
+
@import url('components/navigation.css') layer(components);
|
|
58
|
+
@import url('components/navigation-patterns.css') layer(components);
|
|
59
|
+
@import url('components/site-shell.css') layer(components);
|
|
60
|
+
@import url('components/application-patterns.css') layer(components);
|
|
61
|
+
@import url('components/content-patterns.css') layer(components);
|
|
62
|
+
@import url('components/masonry.css') layer(components);
|
|
63
|
+
@import url('components/img-container.css') layer(components);
|
|
64
|
+
|
|
65
|
+
/* Optional Theme Generator */
|
|
66
|
+
/* @import url("theme-generator.css"); */
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* layout-extra.css
|
|
3
|
+
*
|
|
4
|
+
* A supplementary library of layout-focused mixins, functions, and utilities.
|
|
5
|
+
* ------------------------------------------------------------------------------
|
|
6
|
+
* This file extends the core layout system by providing two things:
|
|
7
|
+
*
|
|
8
|
+
* 1. PROPOSED MIXINS/FUNCTIONS: For applying layout patterns directly in CSS to
|
|
9
|
+
* any element, offering a CSS-centric approach.
|
|
10
|
+
*
|
|
11
|
+
* 2. UTILITY CLASSES: For augmenting the behavior of the <layout-*> components
|
|
12
|
+
* with common visual effects and behaviors (e.g., shadows, sticky positioning).
|
|
13
|
+
*
|
|
14
|
+
* ==============================================================================
|
|
15
|
+
* ⚠️ IMPORTANT: PROPOSED FEATURE NOTICE ⚠️
|
|
16
|
+
* The @function and @mixin rules are NOT SUPPORTED in any browser as of late 2025.
|
|
17
|
+
* This file demonstrates a forward-looking, pre-processor-free approach.
|
|
18
|
+
* ==============================================================================
|
|
19
|
+
*
|
|
20
|
+
* --- TABLE OF CONTENTS ---
|
|
21
|
+
*
|
|
22
|
+
* 1. LAYOUT MIXINS
|
|
23
|
+
* - `@mixin --layout-stack`
|
|
24
|
+
* - `@mixin --layout-grid`
|
|
25
|
+
* - `@mixin --layout-sidebar`
|
|
26
|
+
*
|
|
27
|
+
* 2. LAYOUT FUNCTIONS
|
|
28
|
+
* - `@function --aspect-ratio`
|
|
29
|
+
*
|
|
30
|
+
* 3. UTILITY CLASSES
|
|
31
|
+
* - `.has-shadow-sm`, `.has-shadow-md`, `.has-shadow-lg`
|
|
32
|
+
* - `.is-sticky`
|
|
33
|
+
* - `.is-full-bleed`
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
/*
|
|
38
|
+
* ==============================================================================
|
|
39
|
+
* 1. LAYOUT MIXINS (Proposed Syntax)
|
|
40
|
+
* ==============================================================================
|
|
41
|
+
* These mixins allow you to apply the logic of the layout components to any
|
|
42
|
+
* standard HTML element in your own stylesheets.
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @mixin --layout-stack
|
|
47
|
+
* Applies vertical stacking logic to the current selector.
|
|
48
|
+
*
|
|
49
|
+
* @param {<length>} --gap - The space between stacked items.
|
|
50
|
+
* @param {string} --align - The horizontal alignment of items.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* .product-details {
|
|
54
|
+
* @apply --layout-stack(--gap: 2rem, --align: flex-start);
|
|
55
|
+
* }
|
|
56
|
+
*/
|
|
57
|
+
@mixin --layout-stack(--gap, --align: stretch) {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
justify-content: flex-start;
|
|
61
|
+
align-items: var(--align);
|
|
62
|
+
gap: var(--gap, var(--space-md, 1.5rem));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @mixin --layout-grid
|
|
67
|
+
* Applies responsive grid logic to the current selector.
|
|
68
|
+
*
|
|
69
|
+
* @param {string} --min-item-size - The minimum size for each grid item.
|
|
70
|
+
* @param {<length>} --gap - The gap between items.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* .card-collection {
|
|
74
|
+
* @apply --layout-grid(--min-item-size: 20rem);
|
|
75
|
+
* }
|
|
76
|
+
*/
|
|
77
|
+
@mixin --layout-grid(--min-item-size, --gap) {
|
|
78
|
+
display: grid;
|
|
79
|
+
gap: var(--gap, var(--space-md, 1.5rem));
|
|
80
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min-item-size, 16rem)), 1fr));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @mixin --layout-sidebar
|
|
85
|
+
* Applies the logic for a responsive sidebar layout.
|
|
86
|
+
*
|
|
87
|
+
* @param {string} --side-width - The width of the sidebar.
|
|
88
|
+
* @param {string} --content-min - The point at which the main content wraps.
|
|
89
|
+
* @param {<length>} --gap - The space between sidebar and content.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* main.with-sidebar {
|
|
93
|
+
* @apply --layout-sidebar(--side-width: 250px);
|
|
94
|
+
*
|
|
95
|
+
* & > :last-child {
|
|
96
|
+
* flex-basis: var(--side-width); // Match sidebar width
|
|
97
|
+
* }
|
|
98
|
+
* }
|
|
99
|
+
*/
|
|
100
|
+
@mixin --layout-sidebar(--side-width, --content-min, --gap) {
|
|
101
|
+
display: flex;
|
|
102
|
+
flex-wrap: wrap;
|
|
103
|
+
gap: var(--gap, var(--space-lg, 2rem));
|
|
104
|
+
|
|
105
|
+
& > :first-child { /* Main content */
|
|
106
|
+
flex-grow: 9999;
|
|
107
|
+
flex-basis: var(--content-min, 50%);
|
|
108
|
+
}
|
|
109
|
+
& > :last-child { /* Sidebar */
|
|
110
|
+
flex-grow: 1;
|
|
111
|
+
flex-basis: var(--side-width, 20rem);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
/*
|
|
117
|
+
* ==============================================================================
|
|
118
|
+
* 2. LAYOUT FUNCTIONS (Proposed Syntax)
|
|
119
|
+
* ==============================================================================
|
|
120
|
+
*/
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @function --aspect-ratio
|
|
124
|
+
* A simple function to return a clean aspect-ratio value.
|
|
125
|
+
*
|
|
126
|
+
* @param {<number>} --width - The width component of the ratio.
|
|
127
|
+
* @param {<number>} --height - The height component of the ratio.
|
|
128
|
+
* @returns {string} The aspect-ratio value (e.g., "16 / 9").
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* .video-player {
|
|
132
|
+
* aspect-ratio: --aspect-ratio(16, 9);
|
|
133
|
+
* }
|
|
134
|
+
*/
|
|
135
|
+
@function --aspect-ratio(--width type(*), --height type(*)) returns type(*) {
|
|
136
|
+
result: var(--width) + ' / ' + var(--height);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
/*
|
|
141
|
+
* ==============================================================================
|
|
142
|
+
* 3. UTILITY CLASSES
|
|
143
|
+
* ==============================================================================
|
|
144
|
+
* These classes can be added to layout components (or any element) to apply
|
|
145
|
+
* common, shared visual effects and behaviors.
|
|
146
|
+
*/
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Shadow Utilities
|
|
150
|
+
* Apply consistent, token-based shadows.
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* <layout-sidebar class="has-shadow-md">...</layout-sidebar>
|
|
154
|
+
*/
|
|
155
|
+
:where(.has-shadow-sm, .has-shadow-md, .has-shadow-lg) {
|
|
156
|
+
/* Assumes shadow tokens are defined in a global file like `base.css` */
|
|
157
|
+
--_shadow-sm: var(--shadow-1, 0 1px 3px rgb(0 0 0 / 0.1));
|
|
158
|
+
--_shadow-md: var(--shadow-2, 0 4px 6px rgb(0 0 0 / 0.1));
|
|
159
|
+
--_shadow-lg: var(--shadow-3, 0 10px 15px rgb(0 0 0 / 0.1));
|
|
160
|
+
}
|
|
161
|
+
.has-shadow-sm { box-shadow: var(--_shadow-sm); }
|
|
162
|
+
.has-shadow-md { box-shadow: var(--_shadow-md); }
|
|
163
|
+
.has-shadow-lg { box-shadow: var(--_shadow-lg); }
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Sticky Positioning Utility
|
|
168
|
+
* Makes an element "stick" to the top of its scrolling container.
|
|
169
|
+
* Perfect for sidebars or headers.
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* <layout-sidebar>
|
|
173
|
+
* <main>...</main>
|
|
174
|
+
* <aside class="is-sticky">...</aside>
|
|
175
|
+
* </layout-sidebar>
|
|
176
|
+
*/
|
|
177
|
+
.is-sticky {
|
|
178
|
+
--_sticky-top: var(--sticky-top-offset, 1rem); /* Customizable offset */
|
|
179
|
+
|
|
180
|
+
position: sticky;
|
|
181
|
+
top: var(--_sticky-top);
|
|
182
|
+
align-self: start; /* Prevents stretching in flex/grid containers */
|
|
183
|
+
max-height: calc(100vh - var(--_sticky-top) * 2); /* Prevents overflow */
|
|
184
|
+
overflow-y: auto;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Full Bleed Utility
|
|
190
|
+
* Allows a child element to break out of its parent container's padding
|
|
191
|
+
* and stretch to the full width of the viewport.
|
|
192
|
+
*
|
|
193
|
+
* @example
|
|
194
|
+
* <layout-center>
|
|
195
|
+
* <p>This text is constrained.</p>
|
|
196
|
+
* <img src="..." alt="..." class="is-full-bleed">
|
|
197
|
+
* <p>This text is also constrained.</p>
|
|
198
|
+
* </layout-center>
|
|
199
|
+
*/
|
|
200
|
+
.is-full-bleed {
|
|
201
|
+
width: 100vw;
|
|
202
|
+
margin-inline: 50%;
|
|
203
|
+
transform: translateX(-50%);
|
|
204
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* layout-extras-helpers.css */
|
|
2
|
+
|
|
3
|
+
/* Density presets */
|
|
4
|
+
:root[data-density="compact"] { --l-gap: var(--spacing-sm); --l-padding: var(--spacing-sm); }
|
|
5
|
+
:root[data-density="comfortable"] { --l-gap: var(--spacing-md); --l-padding: var(--spacing-md); }
|
|
6
|
+
:root[data-density="spacious"] { --l-gap: var(--spacing-lg); --l-padding: var(--spacing-lg); }
|
|
7
|
+
|
|
8
|
+
/* Threshold presets for switcher/sidebar */
|
|
9
|
+
:root[data-threshold="tight"] { --l-threshold: 24rem; }
|
|
10
|
+
:root[data-threshold="normal"] { --l-threshold: 30rem; }
|
|
11
|
+
:root[data-threshold="loose"] { --l-threshold: 40rem; }
|
|
12
|
+
|
|
13
|
+
/* Container query helpers */
|
|
14
|
+
@container layout-container (max-width: 30rem) {
|
|
15
|
+
.hide-on-narrow { display: none !important; }
|
|
16
|
+
}
|
|
17
|
+
@container layout-container (min-width: 60rem) {
|
|
18
|
+
.only-on-wide { display: initial !important; }
|
|
19
|
+
}
|