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 65e6a6b
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`|69px with a description, never under 56px |`Item` (`px-4 py-3.5 gap-3`), `PageRows` (`min-h-14`) |
77
+
| A row in `PageRows`|71px 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
@@ -204,10 +206,8 @@ Only where the request asks for a dialog (Screens, Not Dialogs).
204
206
## Units
205
207
206
208
The root is the browser's 16px, so Tailwind's spacing, sizes and widths are their documented values
207
-
(`p-4` is 16px, `max-w-3xl` is 768px) and land on its 4px grid. Text is the exception: `styles.css`
208
-
sets every `--text-*` to Tailwind's default times 15/16, so `text-sm` is 13.125px and body text is
209
-
15px. That is the scale this app has always read at; do not size text in px or rem by hand to match
210
-
the docs.
209
+
(`p-4` is 16px, `max-w-3xl` is 768px) and land on its 4px grid. Text is on Tailwind's own scale
210
+
too: `text-xs` is 12px, `text-sm` 14px and body text 16px. Do not size text in px or rem by hand.
211
211
212
212
Even so, never hardcode a pixel constant derived from a Tailwind token, and never compute a ratio
213
213
from one. Measure the element — `offsetWidth`, `clientWidth`, a `ResizeObserver` — and scale from what
@@ -227,7 +227,8 @@ is actually on screen. The root was once 15px, and every constant taken from the
227
227
- A width, ratio or scale needs a number in pixels → the Units section. Measure, do not assume.
228
228
- Choosing a margin or gap between blocks → the Rhythm table. If the frame already gives it, set none.
229
229
- The screen genuinely does not fit this shape → say so in the response and comment the reason in the
230
-
code. There are two accepted precedents: a table (`admin/audit.tsx`, `width="wide"`), and the
230
+
code. There are three accepted precedents: a table (the audit log, `width="full"`), the
231
+
Artifacts gallery (`width="wide"`, a grid of cards), and the
231
232
Connections tiles (`connections.index.tsx`), a grid of separate `variant="outline"` cards, 56px
232
233
tall and 12px apart, because apps are picked out by their mark rather than read down as a list.
233
234
- The question is which states the screen renders while loading or failing → not this skill;
@@ -239,7 +240,7 @@ is actually on screen. The root was once 15px, and every constant taken from the
239
240
|--------|---------------|------------|
240
241
| 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`|
241
242
| Rows separated by `gap-*` instead of `<Separator />`| A stack of cards rather than one card of rows |`<Separator />` between rows, none after the last |
242
-
|`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 |
243
+
|`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 |
243
244
| 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 |
244
245
| Children on an element passed to `Item`'s `render`| They replace the row's own children; the row draws empty | Pass a childless element |
245
246
|`bg-card` on a row inside a dialog |`--card` equals `--popover`; the row is invisible |`variant="muted"`|
0 commit comments