writing-csslisted
Install: claude install-skill AleksandarBisevac/claude-plugins
# Writing CSS here
Two stylesheets, ~2,000 lines, concatenated by Python after a generated token layer into one
inline `<style>`. Neither is valid alone — both reference custom properties they do not declare,
and `panel.css` on its own fails the `color-scheme` check. Assembly, splitting and the byte pins
belong to `refactoring-the-assembled-ui`; this is how you write a rule.
## Tokens are the language
`_ui_theme.py` declares **78 custom properties** on `:root` (58 of them user-themable) and
prepends them to both sheets. The discipline is already strong — `panel.css` uses `var(--…)` 605
times against 13 raw hex literals, `report.css` 429 against 8 — and it is the thing to protect.
- **Never write a raw colour.** If a role does not exist, add the token; do not inline a hex.
- **The spacing migration is half done, so finish it rather than widening it.** `--sp-0` … `--sp-7`
exist and are used throughout the usage sections, yet `.5rem`, `.25rem`, `.75rem`, `1rem` and
`1.5rem` are still written raw **204 times** elsewhere — and each of those five has an exact
token. Use the token.
- **Type has a four-step scale and the sheets contain about 23 distinct font-size literals.** Pick
a step; add one if the design genuinely needs it.
- **A metric both surfaces use is a token, or it will drift.** It already has: `.shell` is
`max-width:92rem` in the panel and `96rem` in the report, `.bud`'s grid disagrees in four
places, the nav breakpoint is `70rem` against `72rem`, `.tri`