refactor(tokens): make token layer authoritative and wire to layout
- Imported tokens.css directly into BaseLayout.astro. - Removed legacy :root variable definitions from chapters.css, skills-review/styles.css, rules/styles.css, and styles.css. - Added self-hosted --font-sans and --font-mono to tokens.css and updated legacy font stacks. - Removed base.css. - Added a build-output check in check-tokens.mjs to ensure the token layer is loaded in dist html files.
This commit is contained in:
@@ -10,6 +10,8 @@ const { title, description, lang = 'en' } = Astro.props;
|
||||
// Self-hosted Manrope and DM Mono. Lives in `public/fonts/` rather than the
|
||||
// bundled CSS because the legacy stylesheets @import the same file, so there
|
||||
// is exactly one copy of the faces. See public/fonts/fonts.css.
|
||||
import tokensStylesheet from '../styles/tokens.css?url';
|
||||
|
||||
const fonts = `${import.meta.env.BASE_URL}fonts/fonts.css`.replace('//', '/');
|
||||
---
|
||||
|
||||
@@ -20,6 +22,7 @@ const fonts = `${import.meta.env.BASE_URL}fonts/fonts.css`.replace('//', '/');
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>{title}</title>
|
||||
<meta name="description" content={description} />
|
||||
<link rel="stylesheet" href={tokensStylesheet} />
|
||||
<link rel="stylesheet" href={fonts} />
|
||||
<slot name="styles" />
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user