css: remove dark mode, unify token system, eliminate all hardcoded colors

- Remove @media (prefers-color-scheme: dark) block from variables.css
- Delete colors.css (dead reference doc, never loaded)
- Add semantic tokens to variables.css:
    --header-gradient-fade, --header-shadow-strong/soft, --header-nav-active-border
    --search-error-bg/border/color
    --sys-bg-surface/deep/panel, --sys-border/border-deep/border-hover
    --sys-text-dim/bright/body, --sys-overlay, --sys-syntax-* (7 highlight tokens)
    --success/warning/error/blue/yellow/green -muted-bg/border/hover alpha overlays
    --danger-border-muted
- Replace all hardcoded hex/rgba in common.css, main.css, search.css, admin.css, system.css
- Fix --border-color typo -> --border-primary in search.css
- Fix view-toggle__btn active color: --text-primary -> --accent-foreground
- Admin and public share identical token set, no separate admin theme
- Update README.md
This commit is contained in:
Pontoporeia
2026-04-06 16:16:11 +02:00
parent e73fcfd0c8
commit 6a1b41ac93
9 changed files with 183 additions and 212 deletions

View File

@@ -2,34 +2,20 @@
## File Structure
- **variables.css** - CSS custom properties (variables) for colors and theme values
- **colors.css** - Reference documentation of all color values used in the project
- **common.css** - Shared styles: reset, header/nav, search bar, accessibility utilities
- **main.css** - Home page styles
- **admin.css** - Admin section styles
- **system.css** - System page styles
- **search.css** - Search/Directory page styles
- **apropos.css** - About page styles
- **tfe.css** - Individual thesis page styles
- **easymde.min.css** - EasyMDE editor styles (minified, third-party)
- **modern-normalize.min.css** - Modern normalize reset (minified, third-party)
- **variables.css** — all CSS custom properties (single source of truth for every color/token)
- **common.css** — reset, header/nav, search bar, accessibility utilities (loaded on all pages)
- **main.css** — home page
- **search.css** — search/directory page
- **tfe.css** — individual thesis page
- **apropos.css** — about + licence pages
- **system.css** — admin system dashboard (dark terminal panels)
- **admin.css** — admin section (loaded alongside `common.css` on every admin page)
- **modern-normalize.min.css** — third-party reset (minified, do not edit)
## Imports
## Rules
All CSS files automatically import `variables.css` to access CSS custom properties.
## Variables
### Shared Variables (public pages)
- `--purple`, `--purple-dark`, `--purple-light` - Purple palette
- `--black`, `--white` - Base colors
- `--grey-light` - Light grey background
- `--border-color` - Border color
- `--text-muted` - Muted text color
### Admin Variables
- `--admin-bg`, `--admin-bg-alt` - Background colors
- `--admin-border` - Border color
- `--admin-text`, `--admin-text-muted` - Text colors
- `--admin-purple` - Accent color
- `--admin-input-bg` - Input background
- Every color value lives in `variables.css` as a CSS custom property.
- No hardcoded hex, rgb(), or rgba() in any other file.
- All files `@import url("./variables.css")` at the top.
- Admin and public share the same token names — no separate admin theme.
- No dark-mode media query. The system page uses `--sys-*` tokens (intentionally dark terminal aesthetic).