feat: slate and blue theme tokens, Inter only
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
This commit is contained in:
1 parent
899b25f45d
commit
37cb996bc0
7 files changed
+121
-108
No files matched your search
@@ -4,7 +4,7 @@ Serial. One implementer at a time, Opus review gate per task.
|
||||
|
||||
## 1. Theme
|
||||
|
||||
- [ ] 1.1 Token values (light and dark), radius 0.5rem, a card shadow token, Inter only (drop DM Sans).
|
||||
- [x] 1.1 Token values (light and dark), radius 0.5rem, a card shadow token, Inter only (drop DM Sans).
|
||||
- Depends on: none
|
||||
- Tests first: `<html>` carries only the Inter font variable; `globals.css` has no DM Sans; `--primary` is the blue accent in light and dark.
|
||||
- Scope: `solvway-admin-portal/app/globals.css`, `solvway-admin-portal/app/layout.tsx`, `solvway-admin-portal/app/layout.test.tsx`, `solvway-admin-portal/app/globals.test.ts`, `solvway-admin-portal/app/fonts/**`, `solvway-admin-portal/tailwind.config.ts`
|
||||
|
||||
Binary file not shown.
@@ -7,154 +7,157 @@
|
||||
* (Tailwind 4 @theme) into plain CSS custom properties for Tailwind 3's
|
||||
* postcss-based build (see tailwind.config.ts). The old stylesheet's two
|
||||
* Sass-only mixins in actual use (brand-gradient-text, custom-scrollbar) are
|
||||
* folded in below as .brand-wordmark/.scrollable. Fonts (Inter, DM Sans) load
|
||||
* via next/font in app/layout.tsx, which sets --font-inter / --font-dm-sans.
|
||||
* folded in below as .brand-wordmark/.scrollable. Inter, the one type family,
|
||||
* loads via next/font in app/layout.tsx, which sets --font-inter.
|
||||
*
|
||||
* CURRENT SKIN: Co-Lite. Brand primary #6E3E17 (warm brown), accent #F2BC57 (warm gold), body #121212.
|
||||
* CURRENT SKIN: Co-Lite. Slate neutrals with one blue accent (--primary/--ring #2563EB).
|
||||
* To re-skin for another client, edit the values below; nothing else should
|
||||
* change.
|
||||
*/
|
||||
:root {
|
||||
--radius: 1rem;
|
||||
/* Data-table frames (owner request 2026-10-23: 20px read too soft for dense tables): 12px, the
|
||||
scale's sm step, as its own token so tables can move independently of cards. */
|
||||
--table-radius: calc(var(--radius) - 4px);
|
||||
--radius: 0.5rem;
|
||||
/* Data-table frames share the card radius (8px), as their own token so tables can still move
|
||||
independently of cards. */
|
||||
--table-radius: 8px;
|
||||
/* The radius scale (tailwind.config.ts reads these). */
|
||||
--radius-sm: calc(var(--radius) - 4px);
|
||||
--radius-md: calc(var(--radius) - 2px);
|
||||
--radius-sm: 4px;
|
||||
--radius-md: 6px;
|
||||
--radius-lg: var(--radius);
|
||||
--radius-xl: calc(var(--radius) + 4px);
|
||||
--radius-xl: 12px;
|
||||
|
||||
--sidebar-width: 272px;
|
||||
--sidebar-width-collapsed: 76px;
|
||||
--header-height: 64px;
|
||||
--content-max-width: 1600px;
|
||||
|
||||
--background: #fdfbf7;
|
||||
--foreground: #121212;
|
||||
--background: #F8FAFC;
|
||||
--foreground: #0F172A;
|
||||
|
||||
--card: #ffffff;
|
||||
--card-foreground: #121212;
|
||||
--card: #FFFFFF;
|
||||
--card-foreground: #0F172A;
|
||||
|
||||
--popover: #ffffff;
|
||||
--popover-foreground: #121212;
|
||||
--popover: #FFFFFF;
|
||||
--popover-foreground: #0F172A;
|
||||
|
||||
--primary: #6e3e17;
|
||||
--primary-foreground: #ffffff;
|
||||
--primary: #2563EB;
|
||||
--primary-foreground: #FFFFFF;
|
||||
|
||||
--secondary: #f5ede3;
|
||||
--secondary-foreground: #3a2410;
|
||||
--secondary: #F1F5F9;
|
||||
--secondary-foreground: #0F172A;
|
||||
|
||||
--muted: #f7f2ea;
|
||||
--muted-foreground: #6f5b48;
|
||||
--muted: #F1F5F9;
|
||||
--muted-foreground: #475569;
|
||||
|
||||
--accent: #f2bc57;
|
||||
--accent-foreground: #3a2410;
|
||||
--accent-strong: #9a6212;
|
||||
--accent: #EFF6FF;
|
||||
--accent-foreground: #1D4ED8;
|
||||
--accent-strong: #1D4ED8;
|
||||
|
||||
--positive: #1b6e3e;
|
||||
--negative: #b3261e;
|
||||
--warning: #8f5200;
|
||||
--positive: #15803D;
|
||||
--negative: #B91C1C;
|
||||
--warning: #B45309;
|
||||
|
||||
--destructive: #b3261e;
|
||||
--destructive-foreground: #ffffff;
|
||||
--destructive: #DC2626;
|
||||
--destructive-foreground: #FFFFFF;
|
||||
|
||||
--border: #ede4d8;
|
||||
--input: #8d7761;
|
||||
--ring: #6e3e17;
|
||||
--border: #E2E8F0;
|
||||
--input: #CBD5E1;
|
||||
--ring: #2563EB;
|
||||
|
||||
--chart-1: #6e3e17;
|
||||
--chart-2: #1f6f6b;
|
||||
--chart-3: #a15c00;
|
||||
--chart-4: #7b5ac6;
|
||||
--chart-5: #a63d5b;
|
||||
--chart-1: #2563EB;
|
||||
--chart-2: #0D9488;
|
||||
--chart-3: #D97706;
|
||||
--chart-4: #7C3AED;
|
||||
--chart-5: #E11D48;
|
||||
|
||||
/* The contrast colour (dusty blue, approved 2026-10-22 — design.md Part 3): type/category pills
|
||||
and secondary highlights. Never a primary action, never status. */
|
||||
--contrast: #4f7396;
|
||||
--contrast-foreground: #3e5c7a;
|
||||
--contrast-soft: #e4ecf3;
|
||||
/* The contrast colour (slate, so the accent stays the only blue): type/category pills and
|
||||
secondary highlights. Never a primary action, never status. */
|
||||
--contrast: #475569;
|
||||
--contrast-foreground: #475569;
|
||||
--contrast-soft: #F1F5F9;
|
||||
|
||||
/* Data-table header row (owner request 2026-10-23: gold with dusty-blue text instead of light
|
||||
brown). Soft gold, not the full --accent: dusty blue on full gold is only 4.0:1. Opaque, so a
|
||||
sticky header covers the rows under it. */
|
||||
--table-head: #f7d99a;
|
||||
--table-head-foreground: #3e5c7a;
|
||||
/* Data-table header row: a slate tint with slate text. Opaque, so a sticky header covers the
|
||||
rows under it. */
|
||||
--table-head: #F1F5F9;
|
||||
--table-head-foreground: #475569;
|
||||
|
||||
/* Giraffe-spot brand pattern (same artwork as the customer portal's --giraffe-motif): a seamless
|
||||
tile of coat patches, shape only — used as a mask by .giraffe-spots below. */
|
||||
--giraffe-tile: 180px;
|
||||
--giraffe-motif: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="180" height="180" viewBox="0 0 180 180"%3E%3Cpath d="M9.1 -0.2Q15.0 -5.6 23.9 -5.3L37.9 -4.9Q46.8 -4.6 50.4 -1.0L56.1 4.7Q59.7 8.4 56.0 18.6L50.2 34.8Q46.6 45.0 37.4 47.5L23.1 51.3Q13.9 53.7 8.9 47.6L0.9 38.0Q-4.1 31.9 -4.7 26.9L-5.6 18.9Q-6.2 13.8 -0.2 8.4ZM9.1 179.8Q15.0 174.4 23.9 174.7L37.9 175.1Q46.8 175.4 50.4 179.0L56.1 184.7Q59.7 188.4 56.0 198.6L50.2 214.8Q46.6 225.0 37.4 227.5L23.1 231.3Q13.9 233.7 8.9 227.6L0.9 218.0Q-4.1 211.9 -4.7 206.9L-5.6 198.9Q-6.2 193.8 -0.2 188.4ZM230.2 34.8Q226.6 45.0 217.4 47.5L203.1 51.3Q193.9 53.7 188.9 47.6L180.9 38.0Q175.9 31.9 175.3 26.9L174.4 18.9Q173.8 13.8 179.8 8.4L189.1 -0.2Q195.0 -5.6 203.9 -5.3L217.9 -4.9Q226.8 -4.6 230.4 -1.0L236.1 4.7Q239.7 8.4 236.0 18.6ZM230.2 214.8Q226.6 225.0 217.4 227.5L203.1 231.3Q193.9 233.7 188.9 227.6L180.9 218.0Q175.9 211.9 175.3 206.9L174.4 198.9Q173.8 193.8 179.8 188.4L189.1 179.8Q195.0 174.4 203.9 174.7L217.9 175.1Q226.8 175.4 230.4 179.0L236.1 184.7Q239.7 188.4 236.0 198.6ZM12.7 70.7Q15.2 58.5 24.3 56.1L38.6 52.3Q47.8 49.9 55.8 57.4L68.3 69.3Q76.4 76.9 70.4 86.7L61.1 102.2Q55.1 112.1 41.5 109.3L20.1 104.8Q6.4 101.9 8.9 89.8ZM49.1 156.8Q45.9 170.4 37.5 170.1L24.4 169.7Q16.0 169.5 11.5 152.7L4.4 126.3Q-0.2 109.5 1.0 108.7L2.9 107.4Q4.0 106.5 18.2 109.5L40.5 114.2Q54.7 117.1 55.4 118.5L56.5 120.6Q57.2 121.9 54.0 135.5ZM229.1 156.8Q225.9 170.4 217.5 170.1L204.4 169.7Q196.0 169.5 191.5 152.7L184.4 126.3Q179.8 109.5 181.0 108.7L182.9 107.4Q184.0 106.5 198.2 109.5L220.5 114.2Q234.7 117.1 235.4 118.5L236.5 120.6Q237.2 121.9 234.0 135.5ZM59.5 54.1Q51.4 46.4 55.0 36.3L60.7 20.3Q64.4 10.2 74.6 9.7L90.7 9.0Q101.0 8.6 103.9 24.4L108.5 49.3Q111.4 65.2 111.2 65.8L110.9 66.8Q110.6 67.4 102.2 69.2L88.8 72.0Q80.3 73.7 72.2 66.1ZM78.1 126.0Q61.6 119.6 61.0 118.3L59.9 116.3Q59.2 115.0 65.4 104.8L75.0 88.8Q81.1 78.7 89.6 76.9L103.0 74.1Q111.5 72.4 119.4 83.5L131.8 100.9Q139.6 112.1 134.2 120.5L125.7 133.8Q120.3 142.3 103.9 135.9ZM74.3 4.7Q63.6 5.2 60.0 1.5L54.3 -4.2Q50.6 -7.9 53.7 -21.1L58.6 -41.8Q61.6 -55.0 77.6 -48.8L102.8 -39.1Q118.8 -32.9 118.7 -27.7L118.6 -19.5Q118.6 -14.2 113.9 -9.3L106.6 -1.4Q101.9 3.5 91.2 4.0ZM74.3 184.7Q63.6 185.2 60.0 181.5L54.3 175.8Q50.6 172.1 53.7 158.9L58.6 138.2Q61.6 125.0 77.6 131.2L102.8 140.9Q118.8 147.1 118.7 152.3L118.6 160.5Q118.6 165.8 113.9 170.7L106.6 178.6Q101.9 183.5 91.2 184.0ZM155.6 7.5Q168.9 14.4 169.4 19.2L170.3 26.8Q170.8 31.6 155.4 40.0L131.2 53.1Q115.8 61.5 113.0 46.2L108.5 22.1Q105.7 6.8 110.2 2.0L117.1 -5.4Q121.6 -10.1 134.8 -3.3ZM155.6 187.5Q168.9 194.4 169.4 199.2L170.3 206.8Q170.8 211.6 155.4 220.0L131.2 233.1Q115.8 241.5 113.0 226.2L108.5 202.1Q105.7 186.8 110.2 182.0L117.1 174.6Q121.6 169.9 134.8 176.7ZM-56.7 80.4Q-64.7 69.2 -64.5 68.6L-64.2 67.7Q-64.0 67.1 -48.1 58.4L-23.0 44.8Q-7.1 36.1 -2.2 42.0L5.4 51.3Q10.3 57.2 7.8 69.8L3.8 89.7Q1.2 102.4 -0.2 103.4L-2.5 105.0Q-3.9 106.0 -13.0 107.0L-27.1 108.4Q-36.2 109.3 -44.1 98.1ZM123.3 80.4Q115.3 69.2 115.5 68.6L115.8 67.7Q116.0 67.1 131.9 58.4L157.0 44.8Q172.9 36.1 177.8 42.0L185.4 51.3Q190.3 57.2 187.8 69.8L183.8 89.7Q181.2 102.4 179.8 103.4L177.5 105.0Q176.1 106.0 167.0 107.0L152.9 108.4Q143.8 109.3 135.9 98.1ZM-13.6 -68.0Q-4.9 -68.9 -0.4 -52.1L6.7 -25.7Q11.2 -8.9 5.5 -3.7L-3.5 4.5Q-9.2 9.8 -22.4 2.9L-43.2 -7.9Q-56.4 -14.7 -56.4 -20.1L-56.2 -28.5Q-56.2 -33.9 -50.5 -42.8L-41.6 -56.8Q-35.9 -65.7 -27.2 -66.6ZM-13.6 112.0Q-4.9 111.1 -0.4 127.9L6.7 154.3Q11.2 171.1 5.5 176.3L-3.5 184.5Q-9.2 189.8 -22.4 182.9L-43.2 172.1Q-56.4 165.3 -56.4 159.9L-56.2 151.5Q-56.2 146.1 -50.5 137.2L-41.6 123.2Q-35.9 114.3 -27.2 113.4ZM166.4 -68.0Q175.1 -68.9 179.6 -52.1L186.7 -25.7Q191.2 -8.9 185.5 -3.7L176.5 4.5Q170.8 9.8 157.6 2.9L136.8 -7.9Q123.6 -14.7 123.6 -20.1L123.8 -28.5Q123.8 -33.9 129.5 -42.8L138.4 -56.8Q144.1 -65.7 152.8 -66.6ZM166.4 112.0Q175.1 111.1 179.6 127.9L186.7 154.3Q191.2 171.1 185.5 176.3L176.5 184.5Q170.8 189.8 157.6 182.9L136.8 172.1Q123.6 165.3 123.6 159.9L123.8 151.5Q123.8 146.1 129.5 137.2L138.4 123.2Q144.1 114.3 152.8 113.4Z"/%3E%3C/svg%3E');
|
||||
|
||||
--sidebar: #ffffff;
|
||||
--sidebar-foreground: #121212;
|
||||
--sidebar-primary: #6e3e17;
|
||||
--sidebar-primary-foreground: #ffffff;
|
||||
--sidebar-accent: #f7f2ea;
|
||||
--sidebar-accent-foreground: #6e3e17;
|
||||
--sidebar-border: #ede4d8;
|
||||
--sidebar-ring: #6e3e17;
|
||||
--sidebar: #FFFFFF;
|
||||
--sidebar-foreground: #0F172A;
|
||||
--sidebar-primary: #2563EB;
|
||||
--sidebar-primary-foreground: #FFFFFF;
|
||||
--sidebar-accent: #EFF6FF;
|
||||
--sidebar-accent-foreground: #1D4ED8;
|
||||
--sidebar-border: #E2E8F0;
|
||||
--sidebar-ring: #2563EB;
|
||||
|
||||
--font-heading: var(--font-dm-sans), ui-sans-serif, system-ui, sans-serif;
|
||||
--shadow-card: 0 1px 2px rgb(15 23 42 / 0.06), 0 1px 3px rgb(15 23 42 / 0.04);
|
||||
|
||||
--font-heading: var(--font-sans);
|
||||
--font-sans: var(--font-inter), ui-sans-serif, system-ui, sans-serif;
|
||||
--font-mono: var(--font-sans);
|
||||
}
|
||||
|
||||
.dark {
|
||||
--background: #17120f;
|
||||
--foreground: #f8f4ef;
|
||||
--background: #020617;
|
||||
--foreground: #F1F5F9;
|
||||
|
||||
--card: #211a16;
|
||||
--card-foreground: #f8f4ef;
|
||||
--card: #0F172A;
|
||||
--card-foreground: #F1F5F9;
|
||||
|
||||
--popover: #211a16;
|
||||
--popover-foreground: #f8f4ef;
|
||||
--popover: #0F172A;
|
||||
--popover-foreground: #F1F5F9;
|
||||
|
||||
--primary: #d9a05b;
|
||||
--primary-foreground: #241a10;
|
||||
--primary: #60A5FA;
|
||||
--primary-foreground: #0B1220;
|
||||
|
||||
--secondary: #2e251f;
|
||||
--secondary-foreground: #f8f4ef;
|
||||
--secondary: #1E293B;
|
||||
--secondary-foreground: #F1F5F9;
|
||||
|
||||
--muted: #2e251f;
|
||||
--muted-foreground: #bca994;
|
||||
--muted: #1E293B;
|
||||
--muted-foreground: #94A3B8;
|
||||
|
||||
--accent: #f2bc57;
|
||||
--accent-foreground: #241a10;
|
||||
--accent-strong: #f2bc57;
|
||||
--accent: #172554;
|
||||
--accent-foreground: #BFDBFE;
|
||||
--accent-strong: #93C5FD;
|
||||
|
||||
--positive: #6fcf97;
|
||||
--negative: #f08a82;
|
||||
--warning: #f0b94a;
|
||||
--positive: #4ADE80;
|
||||
--negative: #F87171;
|
||||
--warning: #FBBF24;
|
||||
|
||||
--destructive: #f08a82;
|
||||
--destructive-foreground: #241a10;
|
||||
--destructive: #F87171;
|
||||
--destructive-foreground: #0B1220;
|
||||
|
||||
--border: #332a23;
|
||||
--input: #7a6a5c;
|
||||
--ring: #d9a05b;
|
||||
--border: #1E293B;
|
||||
--input: #334155;
|
||||
--ring: #60A5FA;
|
||||
|
||||
--chart-1: #d9a05b;
|
||||
--chart-2: #5fc9c0;
|
||||
--chart-3: #f0b94a;
|
||||
--chart-4: #b49bf0;
|
||||
--chart-5: #e88aa5;
|
||||
--chart-1: #60A5FA;
|
||||
--chart-2: #2DD4BF;
|
||||
--chart-3: #FBBF24;
|
||||
--chart-4: #A78BFA;
|
||||
--chart-5: #FB7185;
|
||||
|
||||
--contrast: #9db8d2;
|
||||
--contrast-foreground: #dbe7f2;
|
||||
--contrast-soft: #22303d;
|
||||
--contrast: #CBD5E1;
|
||||
--contrast-foreground: #CBD5E1;
|
||||
--contrast-soft: #1E293B;
|
||||
|
||||
--table-head: #4a3a1a;
|
||||
--table-head-foreground: #dbe7f2;
|
||||
--table-head: #1E293B;
|
||||
--table-head-foreground: #CBD5E1;
|
||||
|
||||
--sidebar: #211a16;
|
||||
--sidebar-foreground: #f8f4ef;
|
||||
--sidebar-primary: #d9a05b;
|
||||
--sidebar-primary-foreground: #241a10;
|
||||
--sidebar-accent: #2e251f;
|
||||
--sidebar-accent-foreground: #f2bc57;
|
||||
--sidebar-border: #332a23;
|
||||
--sidebar-ring: #d9a05b;
|
||||
--sidebar: #0F172A;
|
||||
--sidebar-foreground: #F1F5F9;
|
||||
--sidebar-primary: #60A5FA;
|
||||
--sidebar-primary-foreground: #0B1220;
|
||||
--sidebar-accent: #172554;
|
||||
--sidebar-accent-foreground: #BFDBFE;
|
||||
--sidebar-border: #1E293B;
|
||||
--sidebar-ring: #60A5FA;
|
||||
|
||||
--shadow-card: 0 1px 2px rgb(0 0 0 / 0.4);
|
||||
}
|
||||
|
||||
* {
|
||||
|
||||
@@ -11,4 +11,17 @@ describe("globals.css", () => {
|
||||
expect(css).toMatch(/html\s*\{[^}]*scrollbar-gutter:\s*stable/);
|
||||
expect(css).toMatch(/html body\[data-scroll-locked\]\s*\{[^}]*margin-right:\s*0\s*!important/);
|
||||
});
|
||||
|
||||
it("uses one type family, the Inter accent blue and the 0.5rem radius", () => {
|
||||
const css = readFileSync(join(__dirname, "globals.css"), "utf8");
|
||||
const block = (sel: string) => css.match(new RegExp(`${sel}\\s*\\{([\\s\\S]*?)\\n\\}`))?.[1] ?? "";
|
||||
expect(css).not.toMatch(/dm-sans|DM Sans/i);
|
||||
expect(block(":root")).toMatch(/--primary:\s*#2563eb/i);
|
||||
expect(block("\\.dark")).toMatch(/--primary:\s*#60a5fa/i);
|
||||
expect(block(":root")).toMatch(/--radius:\s*0\.5rem/);
|
||||
expect(block(":root")).toMatch(/--table-head:\s*#f1f5f9/i);
|
||||
expect(block("\\.dark")).toMatch(/--table-head:\s*#1e293b/i);
|
||||
expect(block(":root")).toMatch(/--muted-foreground:\s*#475569/i);
|
||||
expect(css).not.toMatch(/dusty|gold|brown/i);
|
||||
});
|
||||
});
|
||||
@@ -89,10 +89,10 @@ describe("RootLayout i18n wiring", () => {
|
||||
expect(el.props.lang).toBe("zh-TW");
|
||||
});
|
||||
|
||||
it("puts the Inter and DM Sans font variable classes on html", async () => {
|
||||
it("puts only the Inter font variable class on html", async () => {
|
||||
const el = await RootLayout({ children: <div>page</div> });
|
||||
expect(el.props.className).toContain("--font-inter");
|
||||
expect(el.props.className).toContain("--font-dm-sans");
|
||||
expect(el.props.className).not.toContain("--font-dm-sans");
|
||||
});
|
||||
|
||||
// Spec: "The Admin Portal Displays Labels From The Message Catalog" -- the
|
||||
|
||||
@@ -16,12 +16,6 @@ const inter = localFont({
|
||||
variable: "--font-inter",
|
||||
display: "swap",
|
||||
});
|
||||
const dmSans = localFont({
|
||||
src: "./fonts/dm-sans-latin-wght-normal.woff2",
|
||||
weight: "100 1000",
|
||||
variable: "--font-dm-sans",
|
||||
display: "swap",
|
||||
});
|
||||
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
const t = await getServerT();
|
||||
@@ -44,7 +38,7 @@ export default async function RootLayout({ children }: { children: React.ReactNo
|
||||
const [{ locale, locales }, messages] = await Promise.all([requestLocale(), requestCatalog()]);
|
||||
|
||||
return (
|
||||
<html lang={locale.replace("_", "-")} className={`${inter.variable} ${dmSans.variable}`}>
|
||||
<html lang={locale.replace("_", "-")} className={inter.variable}>
|
||||
<body className="antialiased">
|
||||
<LocalesProvider locales={locales}>
|
||||
<MessagesProvider locale={locale} messages={messages}>
|
||||
|
||||
@@ -87,6 +87,9 @@ const config: Config = {
|
||||
xl: "var(--radius-xl)",
|
||||
table: "var(--table-radius)",
|
||||
},
|
||||
boxShadow: {
|
||||
card: "var(--shadow-card)",
|
||||
},
|
||||
fontFamily: {
|
||||
heading: ["var(--font-heading)"],
|
||||
sans: ["var(--font-sans)"],
|
||||
|
||||
Reference in new issue
Block a user