mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-29 04:44:23 +01:00
home page
This commit is contained in:
22 files changed
+190
-66
No files matched your search
@@ -50,6 +50,7 @@ Pages that are not migrated yet are named `_index.astro` so Astro skips them. Mi
|
||||
- Select elements by their own class, never by structure or tag (`> *`, `> div`, `:first-child`, bare `svg`, `[data-x] > *`). If an element needs styling, give it a class and nest that class under its parent. The exception is content a component renders internally that has no `className` to pass, like the icon inside an `IconButton` (`.swatch svg`).
|
||||
- Nest CSS to mirror the markup: a child's rules go inside its parent's block (`.marker { .bar { } }`), so the stylesheet reads like the HTML tree.
|
||||
- Fully rounded corners use `var(--radius-max)`, never `var(--max-size)`.
|
||||
- Zero takes no unit (`0`, not `0px`), except where it ends up inside `calc()`, which needs a length (`calc(100dvh - var(--x, 0px))`).
|
||||
- Avoid `z-index: 2` or above unless nothing else works. Resolve overlaps first by DOM order (a later sibling at the same `z-index` paints on top, so put overlays and curtains before what must sit above them) or by leveling the field (give competing siblings the same `position: relative`/`z-index: 1`, or `isolation: isolate` a container so its children's layers stay inside it).
|
||||
|
||||
## Components
|
||||
|
||||
Reference in new issue
Block a user