Skip to content

Commit eb6a297

Browse files
committed
fix(areia): fix areia tokens
1 parent b0a236e commit eb6a297

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

apps/playground/src/lib.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,21 @@ export function systemColorSchemeMediaQuery(): MediaQueryList {
133133
return window.matchMedia("(prefers-color-scheme: dark)");
134134
}
135135

136-
/** Inline Areia tokens (Play CDN cannot run `@plugin "areia"`). From imprensa starter preview. */
136+
/** Inline Areia tokens (Play CDN cannot run `@plugin "areia"`). Match areia plugin :root / .dark semantics. */
137137
const DEFAULT_PREVIEW_TAILWIND_STYLE = `
138+
:root {
139+
--areia-foreground: oklch(21% 0.006 285.885);
140+
--areia-text-inverse: oklch(97% 0 0);
141+
}
142+
.dark {
143+
--areia-foreground: oklch(97% 0 0);
144+
--areia-text-inverse: oklch(21% 0.006 285.885);
145+
}
138146
@theme {
139147
--color-areia-background: var(--color-white, #fff);
140-
--color-areia-foreground: oklch(21% 0.006 285.885);
148+
--color-areia-foreground: var(--areia-foreground);
149+
--color-areia-inverse: var(--areia-text-inverse);
150+
--text-color-areia-inverse: var(--areia-text-inverse);
141151
--color-areia-surface: var(--color-white, #fff);
142152
--color-areia-surface-muted: oklch(97% 0 0);
143153
--color-areia-surface-elevated: var(--color-white, #fff);
@@ -163,7 +173,8 @@ const DEFAULT_PREVIEW_TAILWIND_STYLE = `
163173
}
164174
.dark {
165175
--color-areia-background: oklch(10% 0 0);
166-
--color-areia-foreground: oklch(97% 0 0);
176+
--color-areia-foreground: var(--areia-foreground);
177+
--color-areia-inverse: var(--areia-text-inverse);
167178
--color-areia-surface: oklch(17% 0 0);
168179
--color-areia-surface-muted: oklch(26.9% 0 0);
169180
--color-areia-surface-elevated: oklch(20% 0 0);
@@ -287,7 +298,7 @@ export function buildPreviewShellSrcdoc(
287298
</style>
288299
</head>
289300
<body>
290-
<div id="root"></div>
301+
<div id="root" class="min-h-full bg-areia-background text-areia-default"></div>
291302
<div id="preview-toaster"></div>
292303
<script type="module">
293304
const MSG = ${JSON.stringify(PREVIEW_MESSAGE_TYPE)};

0 commit comments

Comments
 (0)