| 1 |
# The site stylesheet |
| 2 |
|
| 3 |
`static/style.css` is generated. It is the join of the files here, in name |
| 4 |
order, produced by `build.rs` and committed. |
| 5 |
|
| 6 |
Committed rather than gitignored because 11,000 lines of heavily annotated CSS |
| 7 |
keep their `git blame` that way, and because `scripts/lint-frontend.sh`, the |
| 8 |
`frontend_payload` test and `tests/workflows/discover.rs` all read the built |
| 9 |
sheet directly. The one door that leaves open, editing the output instead of a |
| 10 |
part, is closed by a reconcile rule in `lint-frontend.sh` that rebuilds the join |
| 11 |
and fails if it differs. |
| 12 |
|
| 13 |
The `@layer components {` opener and its closer are emitted by `build.rs` rather |
| 14 |
than written into a part, so every file here is standalone-valid CSS on its own. |
| 15 |
|
| 16 |
## The parts |
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
| `00-preamble.css` | The charter. No rules. | |
| 21 |
| `05-core.css` | `:root` tokens, element base, and the design system proper: buttons, forms, tabs, tables, utilities, badges, tags, cards, stats, filter bar | |
| 22 |
| `10-pages-content.css` | Item, project, library, article and blog reader | |
| 23 |
| `20-dashboards.css` | Admin and health, import wizard, delete account, export | |
| 24 |
| `30-commerce.css` | Receipt, Fan+, purchase, project settings, cart | |
| 25 |
| `40-pages-misc.css` | Profile through scan pipeline, plus `.field-row`, the page h1/subtitle pair, and `.banner` | |
| 26 |
| `50-chrome.css` | Sections, navigation, header and footer, layout utilities | |
| 27 |
| `60-interaction.css` | Loading indicators, toasts, modals, editors, keyframes | |
| 28 |
| `70-marketing.css` | Landing, pricing calculator, documentation, use cases | |
| 29 |
| `80-git-browser.css` | The `/source/*` subapp | |
| 30 |
| `85-responsive.css` | The two viewport blocks that are not adjacent to what they narrow | |
| 31 |
| `90-discover.css` | Discover, collection picker, search box | |
| 32 |
| `95-partials.css` | One section per partial. A queue awaiting deletion by the described-screen conversion, which is why its line count is a progress meter rather than a problem | |
| 33 |
| `96-late-utilities.css` | Shared utilities that win their ties by sitting late | |
| 34 |
| `97-widgets.css` | Carousel, no-JS gallery fallback, grid cards | |
| 35 |
| `99-handoffs.css` | Layer handoffs, described modal, media picker. Must sort last: a handoff wins by source order | |
| 36 |
|
| 37 |
## Contiguity is the guarantee |
| 38 |
|
| 39 |
Every part is a contiguous line range of the single file this used to be, and |
| 40 |
they load in the original order, so the join is byte-identical and the split |
| 41 |
changed no rendering. |
| 42 |
|
| 43 |
That also says what a safe edit is. CSS resolves ties by source order, so moving |
| 44 |
a rule between parts can change which of two equal-specificity rules wins. A |
| 45 |
move earlier in source order needs its own tie check and its own commit; adding |
| 46 |
a rule to the part it belongs in needs neither. |
| 47 |
|