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,490 @@
|
|
|
1
|
+
/* ================================================ */
|
|
2
|
+
/* == @layer defaults == */
|
|
3
|
+
/* ================================================ */
|
|
4
|
+
/* Purpose: Apply structural styles and basic appearance */
|
|
5
|
+
/* using variables defined in the NEW @layer theme. */
|
|
6
|
+
|
|
7
|
+
@property --font-smoothing-moz {
|
|
8
|
+
syntax: '*';
|
|
9
|
+
initial-value: grayscale;
|
|
10
|
+
inherits: true;
|
|
11
|
+
}
|
|
12
|
+
@property --scroll-behavior {
|
|
13
|
+
syntax: '*';
|
|
14
|
+
initial-value: smooth;
|
|
15
|
+
inherits: true;
|
|
16
|
+
}
|
|
17
|
+
@property --font-smoothing-webkit {
|
|
18
|
+
syntax: '*';
|
|
19
|
+
initial-value: antialiased;
|
|
20
|
+
inherits: true;
|
|
21
|
+
}
|
|
22
|
+
@property --body-line-height {
|
|
23
|
+
syntax: '<number>';
|
|
24
|
+
initial-value: 1.5;
|
|
25
|
+
inherits: true;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* --- Base Body & Document Styles --- */
|
|
29
|
+
body {
|
|
30
|
+
font-family: var(--font-family-body, system-ui, sans-serif);
|
|
31
|
+
color: var(--text-default); /* UPDATED */
|
|
32
|
+
--bg: var(--base);
|
|
33
|
+
background-color: var(--base); /* UPDATED */
|
|
34
|
+
font-size: var(--font-size-body, var(--font-size-base));
|
|
35
|
+
line-height: var(--line-height-body, var(--body-line-height, 1.6));
|
|
36
|
+
|
|
37
|
+
-webkit-font-smoothing: var(--font-smoothing-webkit, antialiased);
|
|
38
|
+
-moz-osx-font-smoothing: var(--font-smoothing-moz, grayscale);
|
|
39
|
+
font-synthesis: var(--font-synthesis, none);
|
|
40
|
+
text-rendering: var(--text-rendering, optimizeLegibility);
|
|
41
|
+
hyphens: var(--body-hyphens, auto);
|
|
42
|
+
scroll-behavior: var(--scroll-behavior, smooth);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* ::selection is handled in @theme */
|
|
46
|
+
|
|
47
|
+
/* --- Typography Defaults --- */
|
|
48
|
+
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, pre, blockquote, figure, table, hr, details {
|
|
49
|
+
margin-block: 0 var(--space-flow, 1em);
|
|
50
|
+
}
|
|
51
|
+
:is(article, section, aside, div, li, dd, dt, blockquote) > :last-child {
|
|
52
|
+
margin-block-end: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
h1, h2, h3, h4, h5, h6 {
|
|
56
|
+
font-family: var(--font-family-heading, var(--font-family-body, system-ui, sans-serif));
|
|
57
|
+
font-weight: var(--font-weight-heading, 600);
|
|
58
|
+
line-height: var(--line-height-heading, 1.15);
|
|
59
|
+
color: var(--text-overt); /* UPDATED */
|
|
60
|
+
letter-spacing: var(--letter-spacing-heading, normal);
|
|
61
|
+
}
|
|
62
|
+
h1 { font-size: var(--font-size-h1); line-height: var(--line-height-h1, var(--line-height-heading)); max-inline-size: var(--measure-heading, 18ch); }
|
|
63
|
+
h2 { font-size: var(--font-size-h2); line-height: var(--line-height-h2, var(--line-height-heading)); max-inline-size: var(--measure-heading, 18ch); }
|
|
64
|
+
h3 { font-size: var(--font-size-h3); line-height: var(--line-height-h3, var(--line-height-heading)); max-inline-size: var(--measure-heading, 18ch); }
|
|
65
|
+
h4 { font-size: var(--font-size-h4); line-height: var(--line-height-h4, var(--line-height-heading)); max-inline-size: var(--measure-heading, 18ch); }
|
|
66
|
+
h5 { font-size: var(--font-size-h5); line-height: var(--line-height-h5, var(--line-height-heading)); max-inline-size: var(--measure-heading, 18ch); }
|
|
67
|
+
h6 { font-size: var(--font-size-h6); line-height: var(--line-height-h6, var(--line-height-heading)); letter-spacing: var(--letter-spacing-h6, 0.5px); text-transform: var(--text-transform-h6, uppercase); max-inline-size: var(--measure-heading, 18ch); }
|
|
68
|
+
|
|
69
|
+
p {
|
|
70
|
+
font-size: var(--font-size-body, var(--font-size-base));
|
|
71
|
+
line-height: var(--line-height-body, var(--body-line-height, 1.6));
|
|
72
|
+
max-inline-size: var(--measure-body, 68ch);
|
|
73
|
+
color: var(--text-default); /* UPDATED (use default body text) */
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Lists */
|
|
77
|
+
ul, ol { padding-inline-start: var(--space-list-indent, 1.5em); }
|
|
78
|
+
ul { list-style: var(--list-style-unordered, disc); }
|
|
79
|
+
ol { list-style: var(--list-style-ordered, decimal); }
|
|
80
|
+
li { margin-block-end: var(--space-list-item, 0.5em); }
|
|
81
|
+
li > ul, li > ol { margin-block-start: var(--space-list-item, 0.5em); margin-block-end: 0; }
|
|
82
|
+
dt { font-weight: var(--font-weight-medium, 500); color: var(--text-overt); } /* UPDATED */
|
|
83
|
+
dd { padding-inline-start: var(--space-list-indent, 1.5em); color: var(--text-subtle); } /* UPDATED */
|
|
84
|
+
dd + dt { margin-block-start: var(--space-md, 1rem); }
|
|
85
|
+
|
|
86
|
+
/* Links - Styling primarily handled in @components */
|
|
87
|
+
a {
|
|
88
|
+
/* Base color set in @components */
|
|
89
|
+
text-decoration: var(--link-decoration, none); /* Keep structural */
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Code blocks and inline code - Structure only, colors in @components */
|
|
93
|
+
pre, code, kbd, samp {
|
|
94
|
+
font-family: var(--font-family-code, var(--font-mono, monospace));
|
|
95
|
+
font-size: var(--font-size-code, 0.9em);
|
|
96
|
+
line-height: var(--line-height-code, 1.4);
|
|
97
|
+
/* color: handled in @components */
|
|
98
|
+
}
|
|
99
|
+
pre {
|
|
100
|
+
padding: var(--space-code-block-y, 0.8em) var(--space-code-block-x, 1em);
|
|
101
|
+
border-radius: var(--radius-md, 6px);
|
|
102
|
+
overflow-x: auto;
|
|
103
|
+
border-width: var(--border-width, 1px);
|
|
104
|
+
border-style: solid;
|
|
105
|
+
/* background/border color: handled in @components */
|
|
106
|
+
}
|
|
107
|
+
:not(pre) > code, kbd, samp {
|
|
108
|
+
padding: var(--space-code-inline-y, 0.2em) var(--space-code-inline-x, 0.4em);
|
|
109
|
+
border-radius: var(--radius-sm, 3px);
|
|
110
|
+
border-width: var(--border-width, 1px);
|
|
111
|
+
border-style: solid;
|
|
112
|
+
/* background/border color: handled in @components */
|
|
113
|
+
}
|
|
114
|
+
kbd { letter-spacing: 0.5px; }
|
|
115
|
+
|
|
116
|
+
/* Blockquotes - Structure only, colors in @components */
|
|
117
|
+
blockquote {
|
|
118
|
+
margin-inline: var(--space-blockquote-margin-inline, 1em);
|
|
119
|
+
padding-inline-start: var(--space-blockquote-pad, 1em);
|
|
120
|
+
border-inline-start-width: var(--border-width-blockquote, 3px);
|
|
121
|
+
border-inline-start-style: solid;
|
|
122
|
+
/* color/border color: handled in @components */
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Horizontal Rule - Structure only, colors in @components */
|
|
126
|
+
hr {
|
|
127
|
+
border: none;
|
|
128
|
+
border-block-start-width: var(--border-width, 1px);
|
|
129
|
+
border-block-start-style: solid;
|
|
130
|
+
/* color: handled in @components */
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* --- Form Element Defaults --- */
|
|
134
|
+
input, select, textarea, fieldset {
|
|
135
|
+
padding: var(--space-input-y, 0.6em) var(--space-input-x, 0.8em);
|
|
136
|
+
border-width: var(--border-width, 1px);
|
|
137
|
+
border-style: solid;
|
|
138
|
+
border-radius: var(--radius-md, 6px);
|
|
139
|
+
font-family: var(--font-family-ui, inherit);
|
|
140
|
+
font-size: var(--font-size-input, var(--font-size-control, 1rem));
|
|
141
|
+
line-height: var(--line-height-control, 1.5);
|
|
142
|
+
transition: border-color var(--transition-duration, 150ms) var(--transition-timing, ease-out),
|
|
143
|
+
box-shadow var(--transition-duration, 150ms) var(--transition-timing, ease-out),
|
|
144
|
+
background-color var(--transition-duration, 150ms) var(--transition-timing, ease-out);
|
|
145
|
+
width: 100%;
|
|
146
|
+
/* color/border/background: handled in @components */
|
|
147
|
+
}
|
|
148
|
+
fieldset {
|
|
149
|
+
padding: var(--space-fieldset-y, 1.5em) var(--space-fieldset-x, 1.2em);
|
|
150
|
+
border-color: var(--outline-default); /* UPDATED */
|
|
151
|
+
}
|
|
152
|
+
legend {
|
|
153
|
+
padding-inline: var(--space-xs, 0.5rem);
|
|
154
|
+
font-weight: var(--font-weight-medium, 500);
|
|
155
|
+
color: var(--text-overt); /* UPDATED */
|
|
156
|
+
}
|
|
157
|
+
input[type="checkbox"], input[type="radio"], input[type="submit"], input[type="button"], input[type="reset"], button {
|
|
158
|
+
width: auto;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* Button Structure - Colors applied via utilities in @utilities */
|
|
162
|
+
button, input[type="button"], input[type="submit"], input[type="reset"] {
|
|
163
|
+
padding: var(--space-button-y, 0.7em) var(--space-button-x, 1.3em);
|
|
164
|
+
border-radius: var(--radius-md, 6px);
|
|
165
|
+
font-family: var(--font-family-ui, inherit);
|
|
166
|
+
font-size: var(--font-size-button, var(--font-size-control, 1rem));
|
|
167
|
+
font-weight: var(--font-weight-button, var(--font-weight-ui, 500));
|
|
168
|
+
letter-spacing: var(--letter-spacing-ui, 0);
|
|
169
|
+
border-width: var(--border-width-button, 1px);
|
|
170
|
+
border-style: solid;
|
|
171
|
+
transition: background-color var(--transition-duration, 150ms) var(--transition-timing, ease-out),
|
|
172
|
+
border-color var(--transition-duration, 150ms) var(--transition-timing, ease-out),
|
|
173
|
+
color var(--transition-duration, 150ms) var(--transition-timing, ease-out),
|
|
174
|
+
box-shadow var(--transition-duration, 150ms) var(--transition-timing, ease-out),
|
|
175
|
+
transform calc(var(--transition-duration, 150ms) / 2) var(--transition-timing, ease-out);
|
|
176
|
+
line-height: var(--line-height-button, var(--line-height-ui, 1.375));
|
|
177
|
+
box-shadow: var(--shadow-button, none); /* Keep shadows if defined elsewhere */
|
|
178
|
+
/* Colors/borders applied via utility classes */
|
|
179
|
+
}
|
|
180
|
+
/* Hover/Active structure - styles may be overridden by utilities */
|
|
181
|
+
button:hover:not([disabled]),
|
|
182
|
+
input[type="button"]:hover:not([disabled]),
|
|
183
|
+
input[type="submit"]:hover:not([disabled]),
|
|
184
|
+
input[type="reset"]:hover:not([disabled]) {
|
|
185
|
+
transform: var(--transform-button-hover, translateY(-1px));
|
|
186
|
+
box-shadow: var(--shadow-button-hover, 0 2px 4px oklch(from var(--base) calc(l - 50%) 0.02 h / 0.1)); /* Example subtle shadow */
|
|
187
|
+
}
|
|
188
|
+
button:active:not([disabled]),
|
|
189
|
+
input[type="button"]:active:not([disabled]),
|
|
190
|
+
input[type="submit"]:active:not([disabled]),
|
|
191
|
+
input[type="reset"]:active:not([disabled]) {
|
|
192
|
+
transform: var(--transform-button-active, translateY(0px));
|
|
193
|
+
box-shadow: var(--shadow-button-active, none);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/* Select element structure - Arrow appearance handled in @components */
|
|
197
|
+
select {
|
|
198
|
+
padding-right: var(--space-select-arrow-gap, calc(var(--space-input-x, 0.8em) * 3));
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* Checkbox/Radio structure - Colors handled in @components */
|
|
202
|
+
input[type="checkbox"], input[type="radio"] {
|
|
203
|
+
appearance: var(--appearance-checkbox-radio, none);
|
|
204
|
+
-webkit-appearance: none; -moz-appearance: none;
|
|
205
|
+
border-width: var(--border-width, 1px); border-style: solid;
|
|
206
|
+
width: var(--size-checkbox-radio, 1.1em); height: var(--size-checkbox-radio, 1.1em);
|
|
207
|
+
margin-inline-end: var(--space-checkbox-radio-label-gap, 0.5em);
|
|
208
|
+
vertical-align: middle; position: relative; display: inline-grid; place-content: center;
|
|
209
|
+
/* border-color: handled in @components */
|
|
210
|
+
}
|
|
211
|
+
input[type="checkbox"] { border-radius: var(--radius-sm, 3px); }
|
|
212
|
+
input[type="radio"] { border-radius: 50%; }
|
|
213
|
+
/* Indicator structure */
|
|
214
|
+
input[type="checkbox"]::before, input[type="radio"]::before {
|
|
215
|
+
content: ''; width: 60%; height: 60%; transform: scale(0);
|
|
216
|
+
transition: transform 100ms ease-in-out;
|
|
217
|
+
/* background/box-shadow color: handled in @components */
|
|
218
|
+
}
|
|
219
|
+
input[type="radio"]::before { border-radius: 50%; }
|
|
220
|
+
input[type="checkbox"]:checked::before, input[type="radio"]:checked::before { transform: scale(1); }
|
|
221
|
+
|
|
222
|
+
/* Disabled State Opacity */
|
|
223
|
+
button[disabled], input[disabled], select[disabled], textarea[disabled], fieldset[disabled] {
|
|
224
|
+
opacity: var(--opacity-disabled, 0.5);
|
|
225
|
+
}
|
|
226
|
+
fieldset[disabled] * { cursor: not-allowed; }
|
|
227
|
+
|
|
228
|
+
/* --- Table Defaults - Structure only, colors in @components --- */
|
|
229
|
+
table {
|
|
230
|
+
width: 100%;
|
|
231
|
+
border-width: var(--border-width, 1px);
|
|
232
|
+
border-style: solid;
|
|
233
|
+
border-radius: var(--radius-lg, 8px);
|
|
234
|
+
overflow: hidden;
|
|
235
|
+
/* border-color: handled in @components */
|
|
236
|
+
}
|
|
237
|
+
th, td {
|
|
238
|
+
padding: var(--space-table-cell-y, 0.8em) var(--space-table-cell-x, 1em);
|
|
239
|
+
text-align: left; vertical-align: top;
|
|
240
|
+
border-bottom-width: var(--border-width, 1px); border-bottom-style: solid;
|
|
241
|
+
/* border-bottom-color: handled in @components */
|
|
242
|
+
}
|
|
243
|
+
thead th {
|
|
244
|
+
font-weight: var(--font-weight-heading, 600);
|
|
245
|
+
border-bottom-width: calc(var(--border-width, 1px) * 2);
|
|
246
|
+
vertical-align: bottom;
|
|
247
|
+
/* background/color: handled in @components */
|
|
248
|
+
}
|
|
249
|
+
tbody tr:last-child th, tbody tr:last-child td { border-bottom: none; }
|
|
250
|
+
|
|
251
|
+
/* --- Basic Utilities Setup --- */
|
|
252
|
+
.container {
|
|
253
|
+
width: min(100% - (var(--space-container-padding, 1rem) * 2), var(--width-container-max, 1100px));
|
|
254
|
+
margin-inline: auto;
|
|
255
|
+
}
|
|
256
|
+
.display-none { display: none !important; }
|
|
257
|
+
.box { padding: var(--b-p, 0); margin: var(--b-m, 0); border-width: var(--b-bw, 0); border-style: solid; border-color: var(--b-bc, transparent); border-radius: var(--b-r, 0); background-color: var(--b-bg, transparent); color: var(--b-fg, inherit); }
|
|
258
|
+
.box[style*="--b-px"] { padding-inline: var(--b-px); }
|
|
259
|
+
.box[style*="--b-py"] { padding-block: var(--b-py); }
|
|
260
|
+
.box[style*="--b-mx"] { margin-inline: var(--b-mx); }
|
|
261
|
+
.box[style*="--b-my"] { margin-block: var(--b-my); }
|
|
262
|
+
.cq-container, .cq { container-type: var(--cq-type, inline-size); container-name: var(--cq-name, default); }
|
|
263
|
+
|
|
264
|
+
/* --- Accessibility Enhancements --- */
|
|
265
|
+
:focus-visible { /* Structure only, color handled in @components */
|
|
266
|
+
outline-style: solid;
|
|
267
|
+
outline-width: var(--focus-ring-width, 2px);
|
|
268
|
+
outline-offset: var(--focus-ring-offset, 2px);
|
|
269
|
+
box-shadow: none;
|
|
270
|
+
}
|
|
271
|
+
:target { scroll-margin-block-start: var(--space-target-margin, 5ex); }
|
|
272
|
+
|
|
273
|
+
/* --- Reduced Motion Preferences --- */
|
|
274
|
+
@media (prefers-reduced-motion: reduce) {
|
|
275
|
+
html { scroll-behavior: auto !important; }
|
|
276
|
+
*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; }
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/* --- View Transition Structure --- */
|
|
280
|
+
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--transition-duration-page, 300ms); animation-timing-function: var(--transition-timing-page, ease-in-out); }
|
|
281
|
+
::view-transition-old(root) { animation-name: var(--view-transition-old, fade-out); }
|
|
282
|
+
::view-transition-new(root) { animation-name: var(--view-transition-new, fade-in); z-index: 1; }
|
|
283
|
+
@keyframes fade-in { from { opacity: 0; } }
|
|
284
|
+
@keyframes fade-out { to { opacity: 0; } }
|
|
285
|
+
|
|
286
|
+
/* Apply base styles to common elements using NEW theme variables */
|
|
287
|
+
body {
|
|
288
|
+
background-color: var(--base);
|
|
289
|
+
color: var(--text-default);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
a {
|
|
293
|
+
color: var(--text-link);
|
|
294
|
+
text-decoration: var(--link-decoration);
|
|
295
|
+
text-decoration-thickness: var(--link-underline-thickness);
|
|
296
|
+
text-underline-offset: var(--link-underline-offset);
|
|
297
|
+
transition: color var(--link-transition-duration) var(--link-transition-timing),
|
|
298
|
+
text-decoration-color var(--link-transition-duration) var(--link-transition-timing);
|
|
299
|
+
}
|
|
300
|
+
a:hover, a:focus-visible {
|
|
301
|
+
color: var(--text-link-hover);
|
|
302
|
+
text-decoration: var(--link-decoration-hover);
|
|
303
|
+
text-decoration-thickness: var(--link-underline-thickness);
|
|
304
|
+
text-underline-offset: var(--link-underline-offset);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/* Basic Button Styling (Structure in defaults, base style here) */
|
|
308
|
+
.button {
|
|
309
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
310
|
+
padding: 0.6em 1.2em; border-radius: var(--radius-md);
|
|
311
|
+
border: var(--border-width) solid var(--outline-default); /* Default outline */
|
|
312
|
+
background-color: var(--surface-default); /* Default surface */
|
|
313
|
+
color: var(--text-default); /* Use default text */
|
|
314
|
+
font-family: var(--font-family-ui, inherit);
|
|
315
|
+
font-size: var(--font-size-control, 1rem);
|
|
316
|
+
font-weight: var(--font-weight-ui, 500); text-align: center; cursor: pointer;
|
|
317
|
+
transition: background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out, box-shadow 150ms ease-out;
|
|
318
|
+
user-select: none; line-height: var(--line-height-ui, 1.375);
|
|
319
|
+
}
|
|
320
|
+
.button:hover:not([disabled]) {
|
|
321
|
+
border-color: var(--outline-overt);
|
|
322
|
+
background-color: var(--highlight-bg-subtle); /* Subtle highlight on hover */
|
|
323
|
+
}
|
|
324
|
+
.button:focus-visible {
|
|
325
|
+
outline: var(--border-width-thick) solid var(--outline-focus);
|
|
326
|
+
outline-offset: 2px;
|
|
327
|
+
border-color: transparent; /* Hide border when outline is visible */
|
|
328
|
+
}
|
|
329
|
+
.button[disabled] {
|
|
330
|
+
opacity: 0.5; cursor: not-allowed;
|
|
331
|
+
background-color: var(--highlight-bg-muted);
|
|
332
|
+
border-color: var(--outline-muted);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
@supports (text-box: trim-both cap alphabetic) {
|
|
336
|
+
:is(.text-box, [data-text-box], text[box]) {
|
|
337
|
+
text-box: var(--text-box, var(--text-box-ui));
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
button,
|
|
341
|
+
input[type="button"],
|
|
342
|
+
input[type="submit"],
|
|
343
|
+
input[type="reset"],
|
|
344
|
+
.button {
|
|
345
|
+
text-box: var(--text-box-button, var(--text-box-ui));
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
@supports (text-box-trim: trim-both) and (text-box-edge: cap alphabetic) {
|
|
350
|
+
:is(.text-box, [data-text-box], text[box]) {
|
|
351
|
+
text-box-trim: var(--text-box-trim, var(--text-box-trim-ui));
|
|
352
|
+
text-box-edge: var(--text-box-edge, var(--text-box-edge-ui));
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
button,
|
|
356
|
+
input[type="button"],
|
|
357
|
+
input[type="submit"],
|
|
358
|
+
input[type="reset"],
|
|
359
|
+
.button {
|
|
360
|
+
text-box-trim: var(--text-box-trim-button, var(--text-box-trim-ui));
|
|
361
|
+
text-box-edge: var(--text-box-edge-button, var(--text-box-edge-ui));
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/* Input field styling */
|
|
366
|
+
.input-field {
|
|
367
|
+
display: block; width: 100%; padding: 0.6em 0.8em;
|
|
368
|
+
border-radius: var(--radius-md);
|
|
369
|
+
border: var(--border-width) solid var(--outline-default);
|
|
370
|
+
background-color: var(--surface-subtle);
|
|
371
|
+
color: var(--text-default);
|
|
372
|
+
transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
|
|
373
|
+
}
|
|
374
|
+
.input-field::placeholder { color: var(--text-muted); opacity: 1; }
|
|
375
|
+
.input-field:hover:not([disabled]) { border-color: var(--outline-overt); }
|
|
376
|
+
.input-field:focus, .input-field:focus-visible {
|
|
377
|
+
outline: none; border-color: var(--outline-focus);
|
|
378
|
+
box-shadow: 0 0 0 var(--border-width-thick) oklch(from var(--outline-focus) l c h / 0.3);
|
|
379
|
+
}
|
|
380
|
+
.input-field[disabled] { opacity: 0.6; background-color: var(--surface-muted); border-color: var(--outline-subtle); cursor: not-allowed; }
|
|
381
|
+
.input-field:invalid { border-color: var(--error); box-shadow: 0 0 0 var(--border-width-thick) oklch(from var(--error) l c h / 0.3); }
|
|
382
|
+
|
|
383
|
+
/* Custom Select Arrow */
|
|
384
|
+
select.input-field {
|
|
385
|
+
background-image: linear-gradient(45deg, transparent 50%, var(--text-subtle) 50%), linear-gradient(135deg, var(--text-subtle) 50%, transparent 50%);
|
|
386
|
+
background-position: right 0.8em top 55%, right calc(0.8em + 5px) top 55%;
|
|
387
|
+
background-size: 5px 5px, 5px 5px;
|
|
388
|
+
background-repeat: no-repeat;
|
|
389
|
+
}
|
|
390
|
+
select.input-field:-moz-focusring { color: transparent; text-shadow: 0 0 0 var(--text-default); }
|
|
391
|
+
|
|
392
|
+
/* Checkbox/Radio Theming */
|
|
393
|
+
input[type="checkbox"], input[type="radio"] {
|
|
394
|
+
border-color: var(--outline-default);
|
|
395
|
+
background-color: var(--surface-subtle);
|
|
396
|
+
}
|
|
397
|
+
input[type="checkbox"]:hover:not(:checked):not([disabled]),
|
|
398
|
+
input[type="radio"]:hover:not(:checked):not([disabled]) {
|
|
399
|
+
border-color: var(--outline-overt);
|
|
400
|
+
background-color: var(--highlight-bg-subtle);
|
|
401
|
+
}
|
|
402
|
+
input[type="checkbox"]:checked, input[type="radio"]:checked {
|
|
403
|
+
background-color: var(--accent);
|
|
404
|
+
border-color: var(--accent);
|
|
405
|
+
}
|
|
406
|
+
input[type="checkbox"]:checked:hover:not([disabled]),
|
|
407
|
+
input[type="radio"]:checked:hover:not([disabled]) {
|
|
408
|
+
background-color: var(--accent-overt);
|
|
409
|
+
border-color: var(--accent-overt);
|
|
410
|
+
}
|
|
411
|
+
input[type="checkbox"]::before, input[type="radio"]::before {
|
|
412
|
+
box-shadow: inset 1em 1em var(--text-on-accent); /* Use contrast text */
|
|
413
|
+
}
|
|
414
|
+
input[type="checkbox"]:checked::before, input[type="radio"]:checked::before {
|
|
415
|
+
/* Style for the checkmark/dot */
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/* Basic card structure */
|
|
419
|
+
.card {
|
|
420
|
+
--bg: var(--surface-default); /* Set local --bg */
|
|
421
|
+
background-color: var(--bg); color: var(--auto-contrast-text, oklch(from var(--bg) clamp(0.1, (var(--l-threshold, 0.65) / l - 1) * 999, 0.98) min(c, var(--c-threshold, 0.08)) h));
|
|
422
|
+
color: var(--auto-contrast-text, oklch(from var(--bg, currentColor) clamp(0.1, (var(--l-threshold, 0.65) / l - 1) * 999, 0.98) min(c, var(--c-threshold, 0.08)) h)); /* Use auto-contrast */
|
|
423
|
+
border-radius: var(--radius-lg);
|
|
424
|
+
padding: 1.5rem;
|
|
425
|
+
border: var(--border-width) solid var(--outline-subtle);
|
|
426
|
+
box-shadow: 0 2px 5px oklch(from var(--base) calc(l - 50%) 0.02 h / 0.1);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/* Code block styling */
|
|
430
|
+
pre {
|
|
431
|
+
background-color: var(--code-block-bg);
|
|
432
|
+
border-color: var(--code-block-border);
|
|
433
|
+
color: var(--text-default); /* Or define --text-code */
|
|
434
|
+
}
|
|
435
|
+
:not(pre) > code, kbd, samp {
|
|
436
|
+
background-color: var(--code-inline-bg);
|
|
437
|
+
border-color: var(--code-inline-border);
|
|
438
|
+
color: var(--text-default); /* Or define --text-code */
|
|
439
|
+
}
|
|
440
|
+
/* Blockquote styling */
|
|
441
|
+
blockquote {
|
|
442
|
+
border-inline-start-color: var(--blockquote-border);
|
|
443
|
+
color: var(--text-subtle);
|
|
444
|
+
}
|
|
445
|
+
/* Horizontal Rule styling */
|
|
446
|
+
hr { border-block-start-color: var(--hr-color, var(--divider-color-subtle, var(--outline-subtle))); }
|
|
447
|
+
/* Table styling */
|
|
448
|
+
table { border-color: var(--table-border); }
|
|
449
|
+
th, td { border-bottom-color: var(--table-border); }
|
|
450
|
+
thead th {
|
|
451
|
+
background-color: var(--table-header-bg);
|
|
452
|
+
color: var(--text-overt); /* Use overt text for header */
|
|
453
|
+
}
|
|
454
|
+
tbody tr:hover {
|
|
455
|
+
--bg: var(--table-row-hover-bg); /* Set local --bg */
|
|
456
|
+
background-color: var(--bg); color: var(--auto-contrast-text, oklch(from var(--bg) clamp(0.1, (var(--l-threshold, 0.65) / l - 1) * 999, 0.98) min(c, var(--c-threshold, 0.08)) h));
|
|
457
|
+
color: var(--auto-contrast-text, oklch(from var(--bg, currentColor) clamp(0.1, (var(--l-threshold, 0.65) / l - 1) * 999, 0.98) min(c, var(--c-threshold, 0.08)) h)); /* Auto contrast on hover */
|
|
458
|
+
}
|
|
459
|
+
/* Enhanced Form Focus States */
|
|
460
|
+
input:focus-visible, select:focus-visible, textarea:focus-visible {
|
|
461
|
+
outline: var(--input-focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
|
|
462
|
+
outline-offset: var(--input-focus-ring-offset);
|
|
463
|
+
background-color: var(--input-focus-bg);
|
|
464
|
+
border-color: var(--outline-focus);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
button:focus-visible,
|
|
468
|
+
a:focus-visible,
|
|
469
|
+
[tabindex]:focus-visible {
|
|
470
|
+
outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
|
|
471
|
+
outline-offset: var(--focus-ring-offset);
|
|
472
|
+
box-shadow: none;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/* Focus Ring Color */
|
|
476
|
+
:focus-visible { outline-color: var(--outline-focus); }
|
|
477
|
+
|
|
478
|
+
/* Contrast Pair Component */
|
|
479
|
+
.contrast-pair {
|
|
480
|
+
--bg: var(--pair-color, var(--accent));
|
|
481
|
+
background-color: var(--bg); color: var(--auto-contrast-text, oklch(from var(--bg) clamp(0.1, (var(--l-threshold, 0.65) / l - 1) * 999, 0.98) min(c, var(--c-threshold, 0.08)) h));
|
|
482
|
+
color: var(--auto-contrast-text, oklch(
|
|
483
|
+
from var(--bg, currentColor)
|
|
484
|
+
clamp(0.1, (var(--l-threshold, 0.65) / l - 1) * 999, 0.98)
|
|
485
|
+
min(c, var(--c-threshold, 0.08))
|
|
486
|
+
h
|
|
487
|
+
));
|
|
488
|
+
padding: 1rem; border-radius: var(--radius-md);
|
|
489
|
+
}
|
|
490
|
+
|
package/core/engine.css
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* ================================================ */
|
|
2
|
+
/* == @layer engine == */
|
|
3
|
+
/* ================================================ */
|
|
4
|
+
:root {
|
|
5
|
+
/* Lightness delta percentages */
|
|
6
|
+
--l-delta-0: calc(0 / 100); --l-delta-1: calc(2 / 100); --l-delta-2: calc(4 / 100); --l-delta-3: calc(7 / 100);
|
|
7
|
+
--l-delta-4: calc(10 / 100); --l-delta-5: calc(14 / 100); --l-delta-6: calc(19 / 100); --l-delta-7: calc(25 / 100);
|
|
8
|
+
--l-delta-8: calc(32 / 100); --l-delta-9: calc(40 / 100); --l-delta-10: calc(50 / 100); --l-delta-11: calc(60 / 100);
|
|
9
|
+
--l-delta-12: calc(70 / 100); --l-delta-13: calc(80 / 100); --l-delta-14: calc(90 / 100);
|
|
10
|
+
--l-delta-0-down: calc(-1 * var(--l-delta-0)); --l-delta-1-down: calc(-1 * var(--l-delta-1));
|
|
11
|
+
--l-delta-2-down: calc(-1 * var(--l-delta-2)); --l-delta-3-down: calc(-1 * var(--l-delta-3));
|
|
12
|
+
--l-delta-4-down: calc(-1 * var(--l-delta-4)); --l-delta-5-down: calc(-1 * var(--l-delta-5));
|
|
13
|
+
--l-delta-6-down: calc(-1 * var(--l-delta-6)); --l-delta-7-down: calc(-1 * var(--l-delta-7));
|
|
14
|
+
--l-delta-8-down: calc(-1 * var(--l-delta-8)); --l-delta-9-down: calc(-1 * var(--l-delta-9));
|
|
15
|
+
--l-delta-10-down: calc(-1 * var(--l-delta-10)); --l-delta-11-down: calc(-1 * var(--l-delta-11));
|
|
16
|
+
--l-delta-12-down: calc(-1 * var(--l-delta-12)); --l-delta-13-down: calc(-1 * var(--l-delta-13));
|
|
17
|
+
--l-delta-14-down: calc(-1 * var(--l-delta-14));
|
|
18
|
+
|
|
19
|
+
/* Chroma delta percentages */
|
|
20
|
+
--c-delta-0: calc(0 / 100); --c-delta-1: calc(10 / 100); --c-delta-2: calc(20 / 100); --c-delta-3: calc(30 / 100);
|
|
21
|
+
--c-delta-4: calc(40 / 100); --c-delta-5: calc(50 / 100); --c-delta-6: calc(60 / 100); --c-delta-7: calc(70 / 100);
|
|
22
|
+
--c-delta-8: calc(80 / 100); --c-delta-9: calc(90 / 100); --c-delta-10: calc(100 / 100);
|
|
23
|
+
--c-delta-0-down: calc(-1 * var(--c-delta-0)); --c-delta-1-down: calc(-1 * var(--c-delta-1));
|
|
24
|
+
--c-delta-2-down: calc(-1 * var(--c-delta-2)); --c-delta-3-down: calc(-1 * var(--c-delta-3));
|
|
25
|
+
--c-delta-4-down: calc(-1 * var(--c-delta-4)); --c-delta-5-down: calc(-1 * var(--c-delta-5));
|
|
26
|
+
--c-delta-6-down: calc(-1 * var(--c-delta-6)); --c-delta-7-down: calc(-1 * var(--c-delta-7));
|
|
27
|
+
--c-delta-8-down: calc(-1 * var(--c-delta-8)); --c-delta-9-down: calc(-1 * var(--c-delta-9));
|
|
28
|
+
--c-delta-10-down: calc(-1 * var(--c-delta-10));
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
}
|