Repository navigation
Commit 9b49c30
Give spacing a rhythm unit
Seventy distinct rem values across 429 margin, padding and gap
declarations -- 0.35 next to 0.38 next to 0.4, none of them chosen
against the others.
The scale indexes by half-pixels, so --space-8 is exactly 1rem. Steps
are 2px apart below 1rem and thin out above it, which is where the old
values actually clustered. A plain 4px grid was the obvious choice and
the wrong one: it split neighbours like 0.35 and 0.4rem into different
steps, pulling apart spacings that were meant to match.
Rendered drift tops out at 3.2px on section padding; 394 of 425 values
moved less than a pixel.
The snapshot tool earned its keep here. The first pass emitted
-var(--space-10) for negative values, which is invalid CSS -- the
browser drops the whole declaration, silently. Nine negative margins had
collapsed to zero, including the reply-context hanging indent, and the
diff caught it as a 21.6px jump before it reached a commit. Negatives
now go through calc(... * -1), and the token comment says why.
Left raw: two clamp() gaps and a calc() with env(safe-area-inset-bottom),
which are fluid rather than stepped, and one 0.02rem gap that is a
sub-pixel nudge rather than spacing.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent fac425c commit 9b49c30
7 files changed
Lines changed: 386 additions & 353 deletions
File tree
- scripts
- src/styles
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
0 commit comments