Skip to content

Commit bad3c8b

Browse files
committed
fix(frontend): use @layer theme for semantic tokens to ensure CSS variable output
- Change @theme inline to @theme for primitive design tokens - Move semantic tokens (--ff-color-*) to @layer theme with :root selector - Ensures semantic tokens are always output as CSS variables for SCSS usage
1 parent add1dad commit bad3c8b

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

frontend/src/index.css

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@import "tailwindcss";
22

3-
@theme inline {
3+
@theme {
44
/* Tailwind teal overrides */
55
--color-teal-50: #E4FBFC;
66
--color-teal-100: #C4F3F5;
@@ -127,15 +127,20 @@
127127
--ff-funit-lg: 1.5rem;
128128
--ff-funit-xl: 2rem;
129129

130-
/* Semantic/Theme colors - must be in same @theme inline block */
131-
--ff-color-action: var(--ff-indigo-800);
132-
--ff-color-highlight: var(--ff-indigo-600);
133-
--ff-color-highlight-light: var(--ff-grey-100);
134-
--ff-color-danger: var(--ff-red-500);
135-
--ff-color-danger-dark: var(--ff-red-600);
136-
--ff-color-disabled: var(--ff-grey-400);
137-
--ff-color-border: var(--ff-grey-200);
138-
--ff-color-context-menu: var(--ff-white);
130+
}
131+
132+
@layer theme {
133+
:root {
134+
/* Semantic/Theme colors - always output as CSS variables */
135+
--ff-color-action: var(--ff-indigo-800);
136+
--ff-color-highlight: var(--ff-indigo-600);
137+
--ff-color-highlight-light: var(--ff-grey-100);
138+
--ff-color-danger: var(--ff-red-500);
139+
--ff-color-danger-dark: var(--ff-red-600);
140+
--ff-color-disabled: var(--ff-grey-400);
141+
--ff-color-border: var(--ff-grey-200);
142+
--ff-color-context-menu: var(--ff-white);
143+
}
139144
}
140145

141146
@layer base {

0 commit comments

Comments
 (0)