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
package/core/theme.css
ADDED
|
@@ -0,0 +1,608 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Improved Theme System
|
|
3
|
+
* ======================
|
|
4
|
+
*
|
|
5
|
+
* Merges the best of the original framework theme system with the theme generator.
|
|
6
|
+
* Features OKLCH auto-contrast, comprehensive utilities, and simplified customization.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
@property --highlight-bg-subtle { syntax: '<color>'; }
|
|
10
|
+
@property --highlight-bg-overt { syntax: '<color>'; }
|
|
11
|
+
|
|
12
|
+
/* ============================================ */
|
|
13
|
+
/* LIGHT MODE THEME */
|
|
14
|
+
/* ============================================ */
|
|
15
|
+
|
|
16
|
+
:root {
|
|
17
|
+
/* ============================================ */
|
|
18
|
+
/* CUSTOMIZATION VARIABLES - Easy to modify */
|
|
19
|
+
/* ============================================ */
|
|
20
|
+
|
|
21
|
+
/* Core Brand Color (OKLCH) */
|
|
22
|
+
--accent-h: 280; /* Hue (0-360°) */
|
|
23
|
+
--accent-c: 0.15; /* Chroma (0-1) */
|
|
24
|
+
--accent-l: 60%; /* Lightness (0-100%) */
|
|
25
|
+
|
|
26
|
+
/* Theme Configuration */
|
|
27
|
+
--surface-saturation: 0.015; /* Surface chroma multiplier */
|
|
28
|
+
--surface-c: var(--surface-saturation); /* Legacy alias */
|
|
29
|
+
--contrast-factor: 1.0; /* Overall contrast multiplier */
|
|
30
|
+
--border-width: 1px; /* Default border width */
|
|
31
|
+
--border-width-thick: 2px; /* Thick border width */
|
|
32
|
+
|
|
33
|
+
/* Border Radius Scale */
|
|
34
|
+
--radius-factor: 1;
|
|
35
|
+
--border-radius-sm: calc(3px * var(--radius-factor));
|
|
36
|
+
--border-radius-md: calc(6px * var(--radius-factor));
|
|
37
|
+
--border-radius-lg: calc(8px * var(--radius-factor));
|
|
38
|
+
--border-radius-xl: calc(12px * var(--radius-factor));
|
|
39
|
+
--border-radius-full: 9999px;
|
|
40
|
+
|
|
41
|
+
/* Preferred short aliases used by components and application themes. */
|
|
42
|
+
--radius-xs: calc(2px * var(--radius-factor));
|
|
43
|
+
--radius-sm: var(--border-radius-sm);
|
|
44
|
+
--radius-md: var(--border-radius-md);
|
|
45
|
+
--radius-lg: var(--border-radius-lg);
|
|
46
|
+
--radius-xl: var(--border-radius-xl);
|
|
47
|
+
--radius-full: var(--border-radius-full);
|
|
48
|
+
|
|
49
|
+
/* Color Relationships */
|
|
50
|
+
--secondary-hue-shift: 60; /* Degrees for secondary (+60° = complementary) */
|
|
51
|
+
--tertiary-hue-shift: -90; /* Degrees for tertiary (-90° = triadic) */
|
|
52
|
+
|
|
53
|
+
/* ============================================ */
|
|
54
|
+
/* DERIVED COLORS - Auto-generated */
|
|
55
|
+
/* ============================================ */
|
|
56
|
+
|
|
57
|
+
/* Secondary & Tertiary Hues */
|
|
58
|
+
/* OKLCH hue wraps naturally, so plain calc() is a wider-supported fallback
|
|
59
|
+
than relying on CSS round/mod syntax here. */
|
|
60
|
+
--secondary-h: calc(var(--accent-h) + var(--secondary-hue-shift));
|
|
61
|
+
--tertiary-h: calc(var(--accent-h) + var(--tertiary-hue-shift));
|
|
62
|
+
--neutral-h: var(--accent-h);
|
|
63
|
+
|
|
64
|
+
/* Feedback Hues */
|
|
65
|
+
--success-h: 145; /* Green */
|
|
66
|
+
--warning-h: 55; /* Amber */
|
|
67
|
+
--error-h: 25; /* Red */
|
|
68
|
+
--info-h: 245; /* Blue */
|
|
69
|
+
|
|
70
|
+
/* Base & Bedrock Colors */
|
|
71
|
+
--base: oklch(97.5% calc(var(--surface-saturation) * 0.9) var(--neutral-h));
|
|
72
|
+
--bedrock: oklch(8% calc(var(--surface-saturation) * 1.2) var(--neutral-h));
|
|
73
|
+
|
|
74
|
+
/* Surface Hierarchy */
|
|
75
|
+
--surface-muted: oklch(95% calc(var(--surface-saturation) * 0.8) var(--neutral-h));
|
|
76
|
+
--surface-subtle: oklch(96% calc(var(--surface-saturation) * 1.05) var(--neutral-h));
|
|
77
|
+
--surface: oklch(94% calc(var(--surface-saturation) * 1.2) var(--neutral-h));
|
|
78
|
+
--surface-overt: oklch(77.5% calc(var(--surface-saturation) * 2.25) var(--neutral-h));
|
|
79
|
+
--surface-default: var(--surface);
|
|
80
|
+
--surface-overt-dark: var(--surface-overt);
|
|
81
|
+
|
|
82
|
+
/* ============================================ */
|
|
83
|
+
/* TEXT COLORS - Auto-contrast calculation */
|
|
84
|
+
/* ============================================ */
|
|
85
|
+
|
|
86
|
+
/* Base text colors */
|
|
87
|
+
--text-muted: oklch(45% calc(var(--surface-saturation) * 1.5 * var(--contrast-factor)) var(--neutral-h));
|
|
88
|
+
--text-subtle: oklch(35% calc(var(--surface-saturation) * 1.8 * var(--contrast-factor)) var(--neutral-h));
|
|
89
|
+
--text: oklch(20% calc(var(--surface-saturation) * 2 * var(--contrast-factor)) var(--neutral-h));
|
|
90
|
+
--text-overt: oklch(10% calc(var(--surface-saturation) * 2.2 * var(--contrast-factor)) var(--neutral-h));
|
|
91
|
+
--text-default: var(--text); /* Alias for default body text */
|
|
92
|
+
|
|
93
|
+
/* Auto-contrast text on surfaces (simplified for better browser support) */
|
|
94
|
+
--text-on-base: oklch(15% 0.02 var(--neutral-h)); /* Dark text on light base */
|
|
95
|
+
--text-on-bedrock: oklch(98% 0.01 var(--neutral-h)); /* Near-white text on dark bedrock */
|
|
96
|
+
--text-on-surface-muted: oklch(20% 0.02 var(--neutral-h)); /* Dark text on light surface-muted */
|
|
97
|
+
--text-on-surface-subtle: oklch(18% 0.02 var(--neutral-h)); /* Dark text on light surface-subtle */
|
|
98
|
+
--text-on-surface: oklch(15% 0.02 var(--neutral-h)); /* Dark text on light surface */
|
|
99
|
+
--text-on-surface-overt: oklch(12% 0.02 var(--neutral-h)); /* Dark text on light surface-overt */
|
|
100
|
+
|
|
101
|
+
/* Link colors */
|
|
102
|
+
--text-link: oklch(from var(--accent) calc(l + 0.1) calc(c + 0.05) h);
|
|
103
|
+
--text-link-hover: oklch(from var(--text-link) calc(l - 0.1) c h);
|
|
104
|
+
--text-link-visited: oklch(from var(--text-link) calc(l - 0.05) calc(c + 0.02) h);
|
|
105
|
+
|
|
106
|
+
/* Highlighted text */
|
|
107
|
+
--text-highlight-subtle: oklch(from var(--accent) calc(l + 0.2) calc(c - 0.05) h);
|
|
108
|
+
--text-highlight-overt: oklch(from var(--accent) calc(l - 0.1) calc(c + 0.05) h);
|
|
109
|
+
--text-highlight-bg: oklch(from var(--accent) calc(l + 0.8) calc(c - 0.3) h);
|
|
110
|
+
--selection-bg: color-mix(in oklch, var(--accent) 60%, var(--base) 40%);
|
|
111
|
+
--selection-color: var(--text-on-accent);
|
|
112
|
+
--highlight-search-results-bg: color-mix(in oklch, var(--accent-highlight) 72%, var(--base));
|
|
113
|
+
--highlight-search-results-color: var(--text-on-accent);
|
|
114
|
+
--highlight-search-results-decoration: underline;
|
|
115
|
+
--highlight-search-results-decoration-color: color-mix(in oklch, var(--accent) 72%, black 28%);
|
|
116
|
+
|
|
117
|
+
/* ============================================ */
|
|
118
|
+
/* OUTLINE & BORDER COLORS */
|
|
119
|
+
/* ============================================ */
|
|
120
|
+
|
|
121
|
+
/* General outlines */
|
|
122
|
+
--outline-muted: oklch(from var(--base) calc(l - 0.04) calc(c + var(--surface-saturation) * 0.5) h);
|
|
123
|
+
--outline-subtle: oklch(from var(--base) calc(l - 0.05) calc(c + var(--surface-saturation)) h);
|
|
124
|
+
--outline: oklch(from var(--base) calc(l - 0.06) calc(c + var(--surface-saturation) * 1.5) h);
|
|
125
|
+
/* Stable semantic alias consumed by form controls and components. */
|
|
126
|
+
--outline-default: var(--outline);
|
|
127
|
+
--outline-overt: oklch(from var(--base) calc(l - 0.07) calc(c + var(--surface-saturation) * 2) h);
|
|
128
|
+
|
|
129
|
+
/* Semantic outlines */
|
|
130
|
+
--outline-focus: oklch(from var(--accent) calc(l - 0.1) calc(c + 0.1) h);
|
|
131
|
+
--outline-active: oklch(from var(--accent) calc(l - 0.05) calc(c + 0.05) h);
|
|
132
|
+
--outline-error: oklch(50% 0.2 var(--error-h));
|
|
133
|
+
--outline-warning: oklch(65% 0.15 var(--warning-h));
|
|
134
|
+
--outline-success: oklch(55% 0.15 var(--success-h));
|
|
135
|
+
--outline-info: oklch(60% 0.15 var(--info-h));
|
|
136
|
+
|
|
137
|
+
/* ============================================ */
|
|
138
|
+
/* HIGHLIGHT & INTERACTION COLORS */
|
|
139
|
+
/* ============================================ */
|
|
140
|
+
|
|
141
|
+
/* Selection and hover backgrounds */
|
|
142
|
+
--highlight-muted: color-mix(in oklch, var(--base) 88%, var(--accent) 12%);
|
|
143
|
+
--highlight-subtle: color-mix(in oklch, var(--base) 76%, var(--accent) 24%);
|
|
144
|
+
--highlight-overt: color-mix(in oklch, var(--base) 58%, var(--accent) 42%);
|
|
145
|
+
|
|
146
|
+
/* Background highlight variants */
|
|
147
|
+
--highlight-bg-muted: var(--highlight-muted);
|
|
148
|
+
--highlight-bg-subtle: var(--highlight-subtle);
|
|
149
|
+
--highlight-bg-overt: var(--highlight-overt);
|
|
150
|
+
|
|
151
|
+
/* Table-specific hover backgrounds */
|
|
152
|
+
--table-row-hover-bg: var(--highlight-bg-subtle);
|
|
153
|
+
|
|
154
|
+
/* Scrim */
|
|
155
|
+
--scrim: oklch(0% 0 0 / 0.5);
|
|
156
|
+
--scrim-light: oklch(100% 0 0 / 0.3);
|
|
157
|
+
|
|
158
|
+
/* ============================================ */
|
|
159
|
+
/* ACCENT COLOR SYSTEM */
|
|
160
|
+
/* ============================================ */
|
|
161
|
+
|
|
162
|
+
/* Primary accent variations */
|
|
163
|
+
--accent: oklch(var(--accent-l) var(--accent-c) var(--accent-h));
|
|
164
|
+
--accent-muted: oklch(from var(--accent) calc(l + 0.15) calc(c - 0.05) h);
|
|
165
|
+
--accent-subtle: oklch(from var(--accent) calc(l + 0.05) calc(c - 0.02) h);
|
|
166
|
+
--accent-surface: oklch(from var(--accent) calc(l + 0.8) calc(c - 0.1) h);
|
|
167
|
+
--accent-overt: oklch(from var(--accent) calc(l - 0.1) calc(c + 0.05) h);
|
|
168
|
+
--accent-highlight: oklch(from var(--accent) calc(l + 0.5) calc(c - 0.2) h);
|
|
169
|
+
|
|
170
|
+
/* Accent text on different surfaces (dynamic auto-contrast) */
|
|
171
|
+
--text-on-accent: oklch(from var(--accent) clamp(0.1, (0.65 / l - 1) * 999, 0.98) min(c, 0.08) h);
|
|
172
|
+
--accent-on-base: var(--text-on-accent);
|
|
173
|
+
--accent-on-bedrock: var(--text-on-accent);
|
|
174
|
+
--accent-on-surface: var(--text-on-accent);
|
|
175
|
+
|
|
176
|
+
/* ============================================ */
|
|
177
|
+
/* SECONDARY & TERTIARY SYSTEMS */
|
|
178
|
+
/* ============================================ */
|
|
179
|
+
|
|
180
|
+
/* Secondary colors */
|
|
181
|
+
--secondary: oklch(from var(--accent) l c calc(h + var(--secondary-hue-shift)));
|
|
182
|
+
--text-on-secondary: oklch(from var(--secondary) clamp(0.1, (0.65 / l - 1) * 999, 0.98) min(c, 0.08) h);
|
|
183
|
+
--secondary-muted: oklch(from var(--secondary) calc(l + 0.15) calc(c - 0.05) h);
|
|
184
|
+
--secondary-subtle: oklch(from var(--secondary) calc(l + 0.05) calc(c - 0.02) h);
|
|
185
|
+
--secondary-overt: oklch(from var(--secondary) calc(l - 0.1) calc(c + 0.05) h);
|
|
186
|
+
--secondary-highlight: oklch(from var(--secondary) calc(l + 0.5) calc(c - 0.2) h);
|
|
187
|
+
|
|
188
|
+
/* Tertiary colors */
|
|
189
|
+
--tertiary: oklch(from var(--accent) l c calc(h + var(--tertiary-hue-shift)));
|
|
190
|
+
--text-on-tertiary: oklch(from var(--tertiary) clamp(0.1, (0.65 / l - 1) * 999, 0.98) min(c, 0.08) h);
|
|
191
|
+
--tertiary-muted: oklch(from var(--tertiary) calc(l + 0.15) calc(c - 0.05) h);
|
|
192
|
+
--tertiary-subtle: oklch(from var(--tertiary) calc(l + 0.05) calc(c - 0.02) h);
|
|
193
|
+
--tertiary-overt: oklch(from var(--tertiary) calc(l - 0.1) calc(c + 0.05) h);
|
|
194
|
+
--tertiary-highlight: oklch(from var(--tertiary) calc(l + 0.5) calc(c - 0.2) h);
|
|
195
|
+
|
|
196
|
+
/* ============================================ */
|
|
197
|
+
/* SEMANTIC COLORS (Success, Warning, etc.) */
|
|
198
|
+
/* ============================================ */
|
|
199
|
+
|
|
200
|
+
--success: oklch(55% 0.15 var(--success-h));
|
|
201
|
+
--warning: oklch(70% 0.15 var(--warning-h));
|
|
202
|
+
--error: oklch(60% 0.2 var(--error-h));
|
|
203
|
+
--info: oklch(65% 0.15 var(--info-h));
|
|
204
|
+
|
|
205
|
+
/* Semantic text colors */
|
|
206
|
+
--text-success: var(--success);
|
|
207
|
+
--text-warning: var(--warning);
|
|
208
|
+
--text-error: var(--error);
|
|
209
|
+
--text-info: var(--info);
|
|
210
|
+
--text-on-success: oklch(from var(--success) clamp(0.1, (0.65 / l - 1) * 999, 0.98) min(c, 0.08) h);
|
|
211
|
+
--text-on-warning: oklch(from var(--warning) clamp(0.1, (0.65 / l - 1) * 999, 0.98) min(c, 0.08) h);
|
|
212
|
+
--text-on-error: oklch(from var(--error) clamp(0.1, (0.65 / l - 1) * 999, 0.98) min(c, 0.08) h);
|
|
213
|
+
--text-on-info: oklch(from var(--info) clamp(0.1, (0.65 / l - 1) * 999, 0.98) min(c, 0.08) h);
|
|
214
|
+
|
|
215
|
+
/* Semantic surface colors */
|
|
216
|
+
--surface-success: oklch(from var(--success) calc(l + 0.9) calc(c - 0.1) h);
|
|
217
|
+
--surface-warning: oklch(from var(--warning) calc(l + 0.8) calc(c - 0.1) h);
|
|
218
|
+
--surface-error: oklch(from var(--error) calc(l + 0.8) calc(c - 0.1) h);
|
|
219
|
+
--surface-info: oklch(from var(--info) calc(l + 0.8) calc(c - 0.1) h);
|
|
220
|
+
--success-highlight: oklch(from var(--success) calc(l + 0.5) calc(c - 0.2) h);
|
|
221
|
+
--warning-highlight: oklch(from var(--warning) calc(l + 0.5) calc(c - 0.2) h);
|
|
222
|
+
--error-highlight: oklch(from var(--error) calc(l + 0.5) calc(c - 0.2) h);
|
|
223
|
+
--info-highlight: oklch(from var(--info) calc(l + 0.5) calc(c - 0.2) h);
|
|
224
|
+
|
|
225
|
+
/* ============================================ */
|
|
226
|
+
/* LEGACY FRAMEWORK COMPATIBILITY */
|
|
227
|
+
/* ============================================ */
|
|
228
|
+
|
|
229
|
+
/* Map to original framework variables for compatibility */
|
|
230
|
+
--theme-primary: var(--accent);
|
|
231
|
+
--theme-secondary: var(--secondary);
|
|
232
|
+
--theme-bg: var(--base);
|
|
233
|
+
--theme-surface: var(--surface);
|
|
234
|
+
--theme-surface-subtle: var(--surface-subtle);
|
|
235
|
+
--theme-text: var(--text);
|
|
236
|
+
--theme-text-muted: var(--text-muted);
|
|
237
|
+
--theme-outline: var(--outline);
|
|
238
|
+
--theme-outline-focus: var(--outline-focus);
|
|
239
|
+
--theme-success: var(--success);
|
|
240
|
+
--theme-warning: var(--warning);
|
|
241
|
+
--theme-error: var(--error);
|
|
242
|
+
--theme-info: var(--info);
|
|
243
|
+
|
|
244
|
+
/* Enhanced focus state variables */
|
|
245
|
+
--focus-ring-width: 2px;
|
|
246
|
+
--focus-ring-offset: 2px;
|
|
247
|
+
--focus-ring-color: var(--outline-focus);
|
|
248
|
+
--focus-ring-style: solid;
|
|
249
|
+
|
|
250
|
+
/* Form element specific focus states */
|
|
251
|
+
--input-focus-ring-width: var(--focus-ring-width);
|
|
252
|
+
--input-focus-ring-offset: 0px;
|
|
253
|
+
--input-focus-bg: transparent;
|
|
254
|
+
--input-hover-border-color: var(--outline-overt);
|
|
255
|
+
|
|
256
|
+
/* Enhanced link styling variables */
|
|
257
|
+
--link-decoration: none;
|
|
258
|
+
--link-decoration-hover: underline;
|
|
259
|
+
--link-underline-thickness: 1.5px;
|
|
260
|
+
--link-underline-offset: 0.15em;
|
|
261
|
+
--link-transition-duration: 150ms;
|
|
262
|
+
--link-transition-timing: ease-out;
|
|
263
|
+
|
|
264
|
+
/* Container query configuration */
|
|
265
|
+
--cq-type: inline-size;
|
|
266
|
+
--cq-name: default;
|
|
267
|
+
|
|
268
|
+
/* Anchor positioning configuration */
|
|
269
|
+
@property --anchor-offset {
|
|
270
|
+
syntax: '<length>';
|
|
271
|
+
initial-value: 0.5rem;
|
|
272
|
+
inherits: false;
|
|
273
|
+
}
|
|
274
|
+
@property --anchor-max-width {
|
|
275
|
+
syntax: '<length>';
|
|
276
|
+
initial-value: 20rem;
|
|
277
|
+
inherits: false;
|
|
278
|
+
}
|
|
279
|
+
@property --anchor-z-index {
|
|
280
|
+
syntax: '<number>';
|
|
281
|
+
initial-value: 1000;
|
|
282
|
+
inherits: false;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/* Typography (from tokens) */
|
|
286
|
+
--font-family: system-ui, -apple-system, sans-serif;
|
|
287
|
+
--font-size-base: 1rem;
|
|
288
|
+
--font-weight-normal: 400;
|
|
289
|
+
--font-weight-medium: 500;
|
|
290
|
+
--font-weight-semibold: 600;
|
|
291
|
+
--font-weight-bold: 700;
|
|
292
|
+
--line-height-base: 1.5;
|
|
293
|
+
|
|
294
|
+
accent-color: var(--accent);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
::selection {
|
|
298
|
+
background-color: var(--selection-bg, var(--accent-highlight));
|
|
299
|
+
color: var(--selection-color, var(--text-on-accent));
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
::-moz-selection {
|
|
303
|
+
background-color: var(--selection-bg, var(--accent-highlight));
|
|
304
|
+
color: var(--selection-color, var(--text-on-accent));
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
::highlight(search-results) {
|
|
308
|
+
background-color: var(--highlight-search-results-bg, var(--accent-highlight));
|
|
309
|
+
color: var(--highlight-search-results-color, var(--text-on-accent));
|
|
310
|
+
text-decoration: var(--highlight-search-results-decoration, underline);
|
|
311
|
+
text-decoration-color: var(--highlight-search-results-decoration-color, currentColor);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
::highlight(current-search-result) {
|
|
315
|
+
background-color: var(--accent);
|
|
316
|
+
color: var(--text-on-accent);
|
|
317
|
+
text-decoration: var(--highlight-search-results-decoration, underline);
|
|
318
|
+
text-decoration-color: var(--highlight-search-results-decoration-color, currentColor);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/* ============================================ */
|
|
322
|
+
/* DARK MODE THEME */
|
|
323
|
+
/* ============================================ */
|
|
324
|
+
|
|
325
|
+
@media (prefers-color-scheme: dark) {
|
|
326
|
+
:root:not([data-color-scheme="light"]) {
|
|
327
|
+
/* Dark mode adjustments */
|
|
328
|
+
--accent-l: 70%;
|
|
329
|
+
--accent-c: 0.18;
|
|
330
|
+
--surface-saturation: 0.02;
|
|
331
|
+
|
|
332
|
+
/* Invert surface hierarchy for dark backgrounds */
|
|
333
|
+
--base: oklch(22% calc(var(--surface-saturation) * 0.9) var(--neutral-h));
|
|
334
|
+
--bedrock: oklch(98% calc(var(--surface-saturation) * 0.7) var(--neutral-h));
|
|
335
|
+
|
|
336
|
+
--surface-muted: oklch(20% calc(var(--surface-saturation) * 0.5) var(--neutral-h));
|
|
337
|
+
--surface-subtle: oklch(21% calc(var(--surface-saturation) * 0.7) var(--neutral-h));
|
|
338
|
+
--surface: oklch(25% var(--surface-saturation) var(--neutral-h));
|
|
339
|
+
--surface-overt: oklch(30% calc(var(--surface-saturation) * 1.2) var(--neutral-h));
|
|
340
|
+
--surface-c: var(--surface-saturation); /* Legacy alias */
|
|
341
|
+
--surface-default: var(--surface);
|
|
342
|
+
--surface-overt-dark: var(--surface-overt);
|
|
343
|
+
|
|
344
|
+
/* Adjust text for dark backgrounds */
|
|
345
|
+
--text-muted: oklch(65% calc(var(--surface-saturation) * 1.2) var(--neutral-h));
|
|
346
|
+
--text-subtle: oklch(75% calc(var(--surface-saturation) * 1.0) var(--neutral-h));
|
|
347
|
+
--text: oklch(88% calc(var(--surface-saturation) * 0.8) var(--neutral-h));
|
|
348
|
+
--text-overt: oklch(95% calc(var(--surface-saturation) * 0.6) var(--neutral-h));
|
|
349
|
+
--text-default: var(--text); /* Alias for default body text */
|
|
350
|
+
|
|
351
|
+
/* Auto-contrast text on surfaces for dark mode */
|
|
352
|
+
--text-on-base: oklch(90% 0.02 var(--neutral-h)); /* Light text on dark base */
|
|
353
|
+
--text-on-bedrock: oklch(5% 0.01 var(--neutral-h)); /* Near-black text on light bedrock */
|
|
354
|
+
--text-on-surface-muted: oklch(85% 0.02 var(--neutral-h)); /* Light text on dark surface-muted */
|
|
355
|
+
--text-on-surface-subtle: oklch(87% 0.02 var(--neutral-h)); /* Light text on dark surface-subtle */
|
|
356
|
+
--text-on-surface: oklch(90% 0.02 var(--neutral-h)); /* Light text on dark surface */
|
|
357
|
+
--text-on-surface-overt: oklch(92% 0.02 var(--neutral-h)); /* Light text on dark surface-overt */
|
|
358
|
+
|
|
359
|
+
/* Accent text on surfaces for dark mode (handled by auto-contrast) */
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/* ============================================ */
|
|
364
|
+
/* HIGH CONTRAST MODE */
|
|
365
|
+
/* ============================================ */
|
|
366
|
+
|
|
367
|
+
@media (prefers-contrast: high) {
|
|
368
|
+
:root {
|
|
369
|
+
--contrast-factor: 1.3;
|
|
370
|
+
--border-width: 2px;
|
|
371
|
+
--border-width-thick: 3px;
|
|
372
|
+
|
|
373
|
+
/* Enhanced contrasts */
|
|
374
|
+
--text-subtle: oklch(30% 0.03 var(--neutral-h));
|
|
375
|
+
--text-muted: oklch(25% 0.02 var(--neutral-h));
|
|
376
|
+
--outline-focus: oklch(50% 0.3 var(--accent-h));
|
|
377
|
+
--outline: oklch(from var(--base) calc(l - 0.08) calc(c + var(--surface-saturation) * 2) h);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/* High contrast form elements */
|
|
381
|
+
input, select, textarea, button {
|
|
382
|
+
border-width: var(--border-width-thick) !important;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/* Allow applications to override the operating-system preference explicitly.
|
|
387
|
+
* Removing the attribute restores automatic mode. */
|
|
388
|
+
:root[data-color-scheme="dark"] {
|
|
389
|
+
--accent-l: 70%;
|
|
390
|
+
--accent-c: 0.18;
|
|
391
|
+
--surface-saturation: 0.02;
|
|
392
|
+
|
|
393
|
+
--base: oklch(22% calc(var(--surface-saturation) * 0.9) var(--neutral-h));
|
|
394
|
+
--bedrock: oklch(98% calc(var(--surface-saturation) * 0.7) var(--neutral-h));
|
|
395
|
+
--surface-muted: oklch(20% calc(var(--surface-saturation) * 0.5) var(--neutral-h));
|
|
396
|
+
--surface-subtle: oklch(21% calc(var(--surface-saturation) * 0.7) var(--neutral-h));
|
|
397
|
+
--surface: oklch(25% var(--surface-saturation) var(--neutral-h));
|
|
398
|
+
--surface-overt: oklch(30% calc(var(--surface-saturation) * 1.2) var(--neutral-h));
|
|
399
|
+
--surface-c: var(--surface-saturation);
|
|
400
|
+
--surface-default: var(--surface);
|
|
401
|
+
--surface-overt-dark: var(--surface-overt);
|
|
402
|
+
|
|
403
|
+
--text-muted: oklch(65% calc(var(--surface-saturation) * 1.2) var(--neutral-h));
|
|
404
|
+
--text-subtle: oklch(75% calc(var(--surface-saturation) * 1) var(--neutral-h));
|
|
405
|
+
--text: oklch(88% calc(var(--surface-saturation) * 0.8) var(--neutral-h));
|
|
406
|
+
--text-overt: oklch(95% calc(var(--surface-saturation) * 0.6) var(--neutral-h));
|
|
407
|
+
--text-default: var(--text);
|
|
408
|
+
--text-on-base: oklch(90% 0.02 var(--neutral-h));
|
|
409
|
+
--text-on-bedrock: oklch(5% 0.01 var(--neutral-h));
|
|
410
|
+
--text-on-surface-muted: oklch(85% 0.02 var(--neutral-h));
|
|
411
|
+
--text-on-surface-subtle: oklch(87% 0.02 var(--neutral-h));
|
|
412
|
+
--text-on-surface: oklch(90% 0.02 var(--neutral-h));
|
|
413
|
+
--text-on-surface-overt: oklch(92% 0.02 var(--neutral-h));
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/* ============================================ */
|
|
417
|
+
/* BRAND THEME OVERRIDES */
|
|
418
|
+
/* ============================================ */
|
|
419
|
+
|
|
420
|
+
:root[data-theme="ocean"] {
|
|
421
|
+
--accent-h: 200; --accent-c: 0.16; --accent-l: 60%;
|
|
422
|
+
--secondary-hue-shift: 40; --tertiary-hue-shift: -80;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
:root[data-theme="sunrise"] {
|
|
426
|
+
--accent-h: 30; --accent-c: 0.18; --accent-l: 62%;
|
|
427
|
+
--secondary-hue-shift: 60; --tertiary-hue-shift: -90;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
:root[data-theme="forest"] {
|
|
431
|
+
--accent-h: 145; --accent-c: 0.16; --accent-l: 58%;
|
|
432
|
+
--secondary-hue-shift: 50; --tertiary-hue-shift: -100;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/* Dark mode brand adjustments */
|
|
436
|
+
@media (prefers-color-scheme: dark) {
|
|
437
|
+
:root:not([data-color-scheme="light"])[data-theme="ocean"] {
|
|
438
|
+
--accent-c: 0.20; --accent-l: 70%;
|
|
439
|
+
}
|
|
440
|
+
:root:not([data-color-scheme="light"])[data-theme="sunrise"] {
|
|
441
|
+
--accent-c: 0.22; --accent-l: 72%;
|
|
442
|
+
}
|
|
443
|
+
:root:not([data-color-scheme="light"])[data-theme="forest"] {
|
|
444
|
+
--accent-c: 0.18; --accent-l: 68%;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/* ============================================ */
|
|
449
|
+
/* AUTO-CONTEXT STYLING */
|
|
450
|
+
/* ============================================ */
|
|
451
|
+
|
|
452
|
+
/* Automatic text color based on surface */
|
|
453
|
+
:where(.bg-base) .text,
|
|
454
|
+
:where(.bg-base) .text-muted,
|
|
455
|
+
:where(.bg-base) .text-subtle,
|
|
456
|
+
:where(.bg-base) .text-overt,
|
|
457
|
+
:where(.bg-base) .text-link,
|
|
458
|
+
:where(.bg-base) p,
|
|
459
|
+
:where(.bg-base) span,
|
|
460
|
+
:where(.bg-base) h1,
|
|
461
|
+
:where(.bg-base) h2,
|
|
462
|
+
:where(.bg-base) h3,
|
|
463
|
+
:where(.bg-base) h4,
|
|
464
|
+
:where(.bg-base) h5,
|
|
465
|
+
:where(.bg-base) h6,
|
|
466
|
+
:where(.bg-base) strong,
|
|
467
|
+
:where(.bg-base) em,
|
|
468
|
+
:where(.bg-base) a { color: var(--text-on-base); }
|
|
469
|
+
|
|
470
|
+
:where(.bg-bedrock) .text,
|
|
471
|
+
:where(.bg-bedrock) .text-muted,
|
|
472
|
+
:where(.bg-bedrock) .text-subtle,
|
|
473
|
+
:where(.bg-bedrock) .text-overt,
|
|
474
|
+
:where(.bg-bedrock) .text-link,
|
|
475
|
+
:where(.bg-bedrock) p,
|
|
476
|
+
:where(.bg-bedrock) span,
|
|
477
|
+
:where(.bg-bedrock) h1,
|
|
478
|
+
:where(.bg-bedrock) h2,
|
|
479
|
+
:where(.bg-bedrock) h3,
|
|
480
|
+
:where(.bg-bedrock) h4,
|
|
481
|
+
:where(.bg-bedrock) h5,
|
|
482
|
+
:where(.bg-bedrock) h6,
|
|
483
|
+
:where(.bg-bedrock) strong,
|
|
484
|
+
:where(.bg-bedrock) em,
|
|
485
|
+
:where(.bg-bedrock) a { color: var(--text-on-bedrock); }
|
|
486
|
+
|
|
487
|
+
:where(.bg-surface) .text,
|
|
488
|
+
:where(.bg-surface) .text-muted,
|
|
489
|
+
:where(.bg-surface) .text-subtle,
|
|
490
|
+
:where(.bg-surface) .text-overt,
|
|
491
|
+
:where(.bg-surface) .text-link,
|
|
492
|
+
:where(.bg-surface) p,
|
|
493
|
+
:where(.bg-surface) span,
|
|
494
|
+
:where(.bg-surface) h1,
|
|
495
|
+
:where(.bg-surface) h2,
|
|
496
|
+
:where(.bg-surface) h3,
|
|
497
|
+
:where(.bg-surface) h4,
|
|
498
|
+
:where(.bg-surface) h5,
|
|
499
|
+
:where(.bg-surface) h6,
|
|
500
|
+
:where(.bg-surface) strong,
|
|
501
|
+
:where(.bg-surface) em,
|
|
502
|
+
:where(.bg-surface) a { color: var(--text-on-surface); }
|
|
503
|
+
|
|
504
|
+
:where(.bg-surface-muted) .text,
|
|
505
|
+
:where(.bg-surface-muted) .text-muted,
|
|
506
|
+
:where(.bg-surface-muted) .text-subtle,
|
|
507
|
+
:where(.bg-surface-muted) .text-overt,
|
|
508
|
+
:where(.bg-surface-muted) .text-link,
|
|
509
|
+
:where(.bg-surface-muted) p,
|
|
510
|
+
:where(.bg-surface-muted) span,
|
|
511
|
+
:where(.bg-surface-muted) h1,
|
|
512
|
+
:where(.bg-surface-muted) h2,
|
|
513
|
+
:where(.bg-surface-muted) h3,
|
|
514
|
+
:where(.bg-surface-muted) h4,
|
|
515
|
+
:where(.bg-surface-muted) h5,
|
|
516
|
+
:where(.bg-surface-muted) h6,
|
|
517
|
+
:where(.bg-surface-muted) strong,
|
|
518
|
+
:where(.bg-surface-muted) em,
|
|
519
|
+
:where(.bg-surface-muted) a { color: var(--text-on-surface-muted); }
|
|
520
|
+
|
|
521
|
+
:where(.bg-surface-subtle) .text,
|
|
522
|
+
:where(.bg-surface-subtle) .text-muted,
|
|
523
|
+
:where(.bg-surface-subtle) .text-subtle,
|
|
524
|
+
:where(.bg-surface-subtle) .text-overt,
|
|
525
|
+
:where(.bg-surface-subtle) .text-link,
|
|
526
|
+
:where(.bg-surface-subtle) p,
|
|
527
|
+
:where(.bg-surface-subtle) span,
|
|
528
|
+
:where(.bg-surface-subtle) h1,
|
|
529
|
+
:where(.bg-surface-subtle) h2,
|
|
530
|
+
:where(.bg-surface-subtle) h3,
|
|
531
|
+
:where(.bg-surface-subtle) h4,
|
|
532
|
+
:where(.bg-surface-subtle) h5,
|
|
533
|
+
:where(.bg-surface-subtle) h6,
|
|
534
|
+
:where(.bg-surface-subtle) strong,
|
|
535
|
+
:where(.bg-surface-subtle) em,
|
|
536
|
+
:where(.bg-surface-subtle) a { color: var(--text-on-surface-subtle); }
|
|
537
|
+
|
|
538
|
+
:where(.bg-surface-overt) .text,
|
|
539
|
+
:where(.bg-surface-overt) .text-muted,
|
|
540
|
+
:where(.bg-surface-overt) .text-subtle,
|
|
541
|
+
:where(.bg-surface-overt) .text-overt,
|
|
542
|
+
:where(.bg-surface-overt) .text-link,
|
|
543
|
+
:where(.bg-surface-overt) p,
|
|
544
|
+
:where(.bg-surface-overt) span,
|
|
545
|
+
:where(.bg-surface-overt) h1,
|
|
546
|
+
:where(.bg-surface-overt) h2,
|
|
547
|
+
:where(.bg-surface-overt) h3,
|
|
548
|
+
:where(.bg-surface-overt) h4,
|
|
549
|
+
:where(.bg-surface-overt) h5,
|
|
550
|
+
:where(.bg-surface-overt) h6,
|
|
551
|
+
:where(.bg-surface-overt) strong,
|
|
552
|
+
:where(.bg-surface-overt) em,
|
|
553
|
+
:where(.bg-surface-overt) a { color: var(--text-on-surface-overt); }
|
|
554
|
+
|
|
555
|
+
/* Automatic accent text on surfaces */
|
|
556
|
+
.bg-accent .text-accent { color: var(--accent-on-base); }
|
|
557
|
+
.bg-surface .text-accent { color: var(--accent-on-surface); }
|
|
558
|
+
|
|
559
|
+
/* Automatic button styling based on context */
|
|
560
|
+
.bg-base .button {
|
|
561
|
+
background-color: var(--surface);
|
|
562
|
+
color: var(--text-on-surface);
|
|
563
|
+
}
|
|
564
|
+
.bg-bedrock .button {
|
|
565
|
+
background-color: var(--surface);
|
|
566
|
+
color: var(--text-on-surface);
|
|
567
|
+
}
|
|
568
|
+
.bg-surface .button {
|
|
569
|
+
background-color: var(--surface);
|
|
570
|
+
color: var(--text-on-surface);
|
|
571
|
+
}
|
|
572
|
+
.bg-surface-muted .button {
|
|
573
|
+
background-color: var(--surface);
|
|
574
|
+
color: var(--text-on-surface);
|
|
575
|
+
}
|
|
576
|
+
.bg-surface-subtle .button {
|
|
577
|
+
background-color: var(--surface);
|
|
578
|
+
color: var(--text-on-surface);
|
|
579
|
+
}
|
|
580
|
+
.bg-surface-overt .button {
|
|
581
|
+
background-color: var(--surface);
|
|
582
|
+
color: var(--text-on-surface);
|
|
583
|
+
}
|
|
584
|
+
.bg-accent .button {
|
|
585
|
+
background-color: var(--surface);
|
|
586
|
+
color: var(--text-on-surface);
|
|
587
|
+
}
|
|
588
|
+
.bg-accent .button-primary {
|
|
589
|
+
background-color: var(--base);
|
|
590
|
+
color: var(--text-on-base);
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.bg-accent .button-primary {
|
|
594
|
+
background-color: var(--accent);
|
|
595
|
+
color: var(--accent-on-base);
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
:root[data-color-scheme="dark"][data-theme="ocean"] {
|
|
599
|
+
--accent-c: 0.20; --accent-l: 70%;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
:root[data-color-scheme="dark"][data-theme="sunrise"] {
|
|
603
|
+
--accent-c: 0.22; --accent-l: 72%;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
:root[data-color-scheme="dark"][data-theme="forest"] {
|
|
607
|
+
--accent-c: 0.18; --accent-l: 68%;
|
|
608
|
+
}
|