diff --git a/apps/cards/apps/web/package.json b/apps/cards/apps/web/package.json index 343fc0e81..5869ae34a 100644 --- a/apps/cards/apps/web/package.json +++ b/apps/cards/apps/web/package.json @@ -37,6 +37,7 @@ "@mana/shared-stores": "workspace:*", "@mana/shared-tailwind": "workspace:*", "@mana/shared-theme": "workspace:*", + "@mana/shared-theme-ui": "workspace:*", "@mana/shared-types": "workspace:*", "@mana/shared-utils": "workspace:*", "dexie": "^4.4.1", diff --git a/apps/cards/apps/web/src/app.css b/apps/cards/apps/web/src/app.css index aac1dd8e6..94506ec9d 100644 --- a/apps/cards/apps/web/src/app.css +++ b/apps/cards/apps/web/src/app.css @@ -1,33 +1,32 @@ @import 'tailwindcss'; +@import '@mana/shared-tailwind/themes.css'; +@import '@mana/shared-tailwind/sources.css'; -/* Phase-1 placeholder palette. Will swap for @mana/shared-theme tokens - once the theming pass lands in Etappe 3c. */ -@theme { - --color-cards-bg: #0a0a0a; - --color-cards-surface: #161616; - --color-cards-border: #2a2a2a; - --color-cards-fg: #f5f5f5; - --color-cards-muted: #a3a3a3; - --color-cards-accent: #6366f1; -} +/* Phase A — Cards now lives on the unified @mana/shared-theme tokens. + The placeholder --color-cards-* palette is gone; everything goes + through `--color-{background,foreground,surface,muted,…}` from + shared-tailwind. The runtime `createThemeStore({ appId: 'cards' })` + in +layout.svelte writes the live variant + mode onto the + document. */ -/* Cloze rendering classes — produced by @mana/cards-core/render. */ +/* Cloze rendering — produced by @mana/cards-core/render. Uses the + active app accent so the highlight follows the Cards brand. */ .cloze-blank { - background: rgba(99, 102, 241, 0.15); + background: hsl(var(--color-app-accent) / 0.18); border-radius: 0.25rem; padding: 0.05rem 0.4rem; - color: #a5b4fc; + color: hsl(var(--color-app-accent)); font-style: italic; } mark.cloze-active { - background: rgba(34, 197, 94, 0.2); - color: #86efac; + background: hsl(var(--color-success) / 0.2); + color: hsl(var(--color-success)); padding: 0.05rem 0.25rem; border-radius: 0.25rem; } -/* Minimal styling for HTML produced by marked() — Tailwind 4 ships +/* Minimal styling for HTML produced by marked() — Tailwind v4 ships without typography plugin so we set the basics by hand. */ .card-content :where(p, ul, ol) { margin-block: 0.5rem; @@ -41,19 +40,19 @@ mark.cloze-active { padding-inline-start: 1.25rem; } .card-content :where(code) { - background: rgba(255, 255, 255, 0.06); + background: hsl(var(--color-muted) / 0.6); padding: 0.1rem 0.3rem; border-radius: 0.25rem; font-size: 0.95em; } .card-content :where(pre) { - background: rgba(255, 255, 255, 0.04); + background: hsl(var(--color-muted) / 0.4); padding: 0.75rem; border-radius: 0.5rem; overflow-x: auto; } .card-content :where(a) { - color: #818cf8; + color: hsl(var(--color-app-accent)); text-decoration: underline; } .card-content :where(strong) { diff --git a/apps/cards/apps/web/src/app.html b/apps/cards/apps/web/src/app.html index 523daa393..470d4ca25 100644 --- a/apps/cards/apps/web/src/app.html +++ b/apps/cards/apps/web/src/app.html @@ -1,5 +1,5 @@ - +
@@ -8,7 +8,7 @@ %sveltekit.head% - +