Standardize responsive breakpoints (Refs #130)
CI / checks (push) Successful in 5m20s

This commit is contained in:
2026-10-10 19:44:55 -04:00
parent 7442c6fd15
commit d2b2958700
6 changed files with 214 additions and 14 deletions
+23
View File
@@ -50,6 +50,29 @@ and action targets. Avoid nested buttons or placing a button inside a link.
Allow long server identities to wrap and tab/filter rows to scroll on narrow
screens.
### Responsive widths
Use the shared breakpoint scale in `src/lib/ui/styles/tokens.css`:
| Token | Width | Use |
| ----------------- | ------- | ------------------------------------------ |
| `--breakpoint-xs` | 360 px | Extra-small screen adjustments |
| `--breakpoint-sm` | 640 px | Compact controls, cards and page summaries |
| `--breakpoint-md` | 960 px | Sidebar switches to the navigation drawer |
| `--breakpoint-lg` | 1100 px | Dense, multi-column layouts reflow |
CSS custom properties cannot be used inside media conditions. Write the literal
value, for example `@media (max-width: 640px)`, and choose the shared width that
fits the layout. Related page and component changes should use the same width.
For JavaScript behavior, use the identical query and invert `matches` when you
need its complement; avoid adding a pixel to the boundary.
`npm run check:styles` reads this scale and rejects other widths in Svelte and
CSS `@media` queries. The file-and-width allowlist in `scripts/check-ui-styles.mjs`
records existing layouts awaiting migration. Remove entries as those layouts
move to the shared scale; do not add exceptions for new components. The app
shell, Servers page and server cards use only shared widths.
## Navigation
Use the shared navigation metadata for Fleet, Releases, Activity, Players, and