You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 060b211
Browse filesBrowse the repository at this point in the historyBrowse files
| Controls stacked inside a section | 12px | the screen, with `gap-3`|
75
-
| A row in `PageRows`|65px with a description, never under 56px |`Item` (`px-4 py-3.5 gap-3`), `PageRows` (`min-h-14`) |
77
+
| A row in `PageRows`|67px with a description, never under 56px |`Item` (`px-4 py-3.5 gap-3`), `PageRows` (`min-h-14`) |
76
78
| Divider between rows | inset 16px from both edges |`PageRows`, on every horizontal `Separator` inside it |
77
79
78
80
The 32px under the title is deliberately tighter than the 48px between sections: the title belongs
@@ -208,10 +210,8 @@ Only where the request asks for a dialog (Screens, Not Dialogs).
208
210
## Units
209
211
210
212
The root is the browser's 16px, so Tailwind's spacing, sizes and widths are their documented values
211
-
(`p-4` is 16px, `max-w-3xl` is 768px) and land on its 4px grid. Text is the exception: `styles.css`
212
-
sets every `--text-*` to Tailwind's default times 15/16, so `text-sm` is 13.125px and body text is
213
-
15px. That is the scale this app has always read at; do not size text in px or rem by hand to match
214
-
the docs.
213
+
(`p-4` is 16px, `max-w-3xl` is 768px) and land on its 4px grid. Text is on Tailwind's own scale
214
+
too: `text-xs` is 12px, `text-sm` 14px and body text 16px. Do not size text in px or rem by hand.
215
215
216
216
Even so, never hardcode a pixel constant derived from a Tailwind token, and never compute a ratio
217
217
from one. Measure the element — `offsetWidth`, `clientWidth`, a `ResizeObserver` — and scale from what
@@ -231,7 +231,8 @@ is actually on screen. The root was once 15px, and every constant taken from the
231
231
- A width, ratio or scale needs a number in pixels → the Units section. Measure, do not assume.
232
232
- Choosing a margin or gap between blocks → the Rhythm table. If the frame already gives it, set none.
233
233
- The screen genuinely does not fit this shape → say so in the response and comment the reason in the
234
-
code. There are two accepted precedents: a table (`admin/audit.tsx`, `width="wide"`), and the
234
+
code. There are three accepted precedents: a table (the audit log, `width="full"`), the
235
+
Artifacts gallery (`width="wide"`, a grid of cards), and the
235
236
Connections tiles (`connections.index.tsx`), a grid of separate `variant="outline"` cards, 56px
236
237
tall and 12px apart, because apps are picked out by their mark rather than read down as a list.
237
238
- The question is which states the screen renders while loading or failing → not this skill;
@@ -243,7 +244,7 @@ is actually on screen. The root was once 15px, and every constant taken from the
243
244
|--------|---------------|------------|
244
245
| A hand-written `rounded-lg border border-border bg-card` div wrapping rows |`PageRows` re-implemented, and it will drift from the other seven screens | Use `PageRows`|
245
246
| Rows separated by `gap-*` instead of `<Separator />`| A stack of cards rather than one card of rows |`<Separator />` between rows, none after the last |
246
-
|`width="wide"`on anything that is not a table| Prose width is the default for a reason; wide was for the audit log| Leave `width` alone |
247
+
|`width="wide"`or `"full"` on rows or a form| Prose width is the default for a reason; the others are for a grid of cards and a table| Leave `width` alone |
247
248
| A `max-w-*`, `p-*` or text size invented for one screen | A fifth container width, which is what this layout exists to stop | Reach for the existing component |
248
249
| Children on an element passed to `Item`'s `render`| They replace the row's own children; the row draws empty | Pass a childless element |
249
250
|`bg-card` on a row inside a dialog |`--card` equals `--popover`; the row is invisible |`variant="muted"`|
0 commit comments