mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-07 02:03:55 -05:00
shared/styles/_brand.scss is the single source of truth for raw brand hex values (Harvard Crimson, ETH Blue, callout palette). Theme files consume these tokens to derive semantic variables ($accent, $accent-dark, $callout-*) used by the rest of the SCSS layer. Why: previously the same hex codes were duplicated across both theme files (and would have been duplicated again if a third volume were added). A rebrand currently requires touching the listed non-SCSS uses in shared/styles/BRAND.md (HTML meta theme-color, plain CSS, inline QMD styles, SVG fills, JS/Python/TSX constants). Centralizing the SCSS side at least removes duplication within the SCSS layer. book/quarto/assets/styles/_brand.scss is a tracked mirror of the canonical (kept in sync via shared/scripts/sync-mirrors.sh). Required because Sass resolves @import relative to the importing file's physical location, so the book's theme files need _brand.scss reachable as ../brand. shared/styles/README.md adds a file map, a Mermaid diagram of the import graph (consumer entrypoint -> theme -> brand -> base partials), per-subsite entrypoint table, and conventions for adding a new theme.
24 lines
899 B
SCSS
24 lines
899 B
SCSS
// =============================================================================
|
|
// ETH ZURICH THEME
|
|
// =============================================================================
|
|
// Volume II: Machine Learning Systems at Scale
|
|
// Brand: ETH Zurich - Innovation, precision, Swiss engineering
|
|
//
|
|
// Brand colour values are centralised in shared/styles/_brand.scss.
|
|
// =============================================================================
|
|
|
|
@import '../brand';
|
|
|
|
// Primary accent color - ETH corporate blue
|
|
$accent: $brand-eth-blue;
|
|
$accent-name: "ETH Blue";
|
|
|
|
// Accent for dark mode (lighter/brighter for dark backgrounds)
|
|
$accent-dark: $brand-eth-blue-dark;
|
|
|
|
// Callout palette (keeping consistent with Vol1 for continuity)
|
|
$callout-info: $brand-callout-info;
|
|
$callout-success: $brand-callout-success;
|
|
$callout-caution: $brand-callout-caution;
|
|
$callout-secondary: $brand-callout-secondary;
|