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
Copy file name to clipboardExpand all lines: skills/SKILL.md
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,12 +22,12 @@ Forma 36 is the design language of Contentful. Every screen, component, and inte
22
22
## Pre-flight checklist — VERIFY before generating ANY code
23
23
24
24
```
25
-
REQUIRED import '@contentful/f36-components/dist/styles.css' — without this, all components render unstyled
25
+
REQUIRED f36 v6 is self-styling via Emotion — NO CSS import needed. Do NOT add `import '@contentful/f36-components/dist/styles.css'` — that file does not exist and will break the build.
26
26
REQUIRED Every component has an explicit import from @contentful/f36-components or @contentful/f36-icons
27
-
REQUIRED All icon names come from @contentful/f36-icons (Phosphor set) — see guidelines/foundations/icons.md for the approved list. NEVER invent icon names. Common: DotsThreeIcon (menus), TrashIcon (delete), PencilIcon (edit), GearIcon (settings), PlusIcon, SearchIcon, CloseIcon, CheckIcon, WarningIcon, ArrowLeftIcon.
27
+
REQUIRED All icon names come from @contentful/f36-icons (Phosphor set) — see guidelines/foundations/icons.md for the approved list. NEVER invent icon names. Common: DotsThreeIcon (menus), TrashSimpleIcon (delete), PencilSimpleIcon (edit), GearSixIcon (settings), PlusIcon, MagnifyingGlassIcon (search), XIcon (close), CheckIcon, WarningIcon, ArrowLeftIcon.
28
28
REQUIRED All colors, spacing, typography use @contentful/f36-tokens — NEVER hardcode hex, px, or font stacks
29
29
REQUIRED Use Layout (not Workbench) as the page shell. Layout.Header, Layout.Body, Layout.Sidebar are REAL compound sub-components (verified in source) — use them confidently. These are the ONLY valid sub-components.
30
-
REQUIRED Skeleton sub-components: Skeleton.Container, Skeleton.DisplayText, Skeleton.BodyText, Skeleton.Image— these are the ONLY valid sub-components. There is NO Skeleton.Row.
30
+
REQUIRED Skeleton sub-components: Skeleton.Container, Skeleton.DisplayText, Skeleton.BodyText, Skeleton.Image, Skeleton.Row — these are the ONLY valid sub-components. Use Skeleton.Row inside Table.Body for table loading states (props: rowCount, columnCount).
31
31
```
32
32
33
33
---
@@ -136,7 +136,7 @@ See `guidelines/composition/visual-verification.md` for the detailed checklist.
136
136
137
137
These apply to all paths. Do not override them.
138
138
139
-
-**CSS import is REQUIRED** — every file must include `import '@contentful/f36-components/dist/styles.css';`. Without it, all components render unstyled. This is the #1 most-forgotten rule.
139
+
-**No CSS import needed** — f36 v6 uses Emotion for runtime styling. `@contentful/f36-components/dist/styles.css` does not exist. Do NOT add it — it will cause a build error.
140
140
-**Tokens only** — never hardcode hex colors, pixel values, or font stacks. Always use `@contentful/f36-tokens`.
141
141
-**Sentence case** — all labels, headings, buttons, menu items. Never Title Case or ALL CAPS.
142
142
-**One primary button** per screen section maximum.
@@ -148,6 +148,7 @@ These apply to all paths. Do not override them.
148
148
-**`Layout` not `Workbench`** — Workbench is deprecated.
149
149
-**No custom shadows** — only `shadowDefault`, `shadowHeavy`, `shadowButton`, `insetBoxShadowDefault`.
-**`Button size="small"` always** — the default 32px height is standard. Never use medium (40px).
151
152
152
153
---
153
154
@@ -161,21 +162,18 @@ From the [Forma 36 code style guide](https://github.com/contentful/forma-36/blob
161
162
- Component type names use `ComponentNameProps` pattern
162
163
- Use `camelCase` for all prop names
163
164
- Pass string prop values with double quotes directly, not wrapped in `{}`
165
+
- Use `style` prop for inline styles — it works universally. The `css` prop (Emotion) only works if the host app has Emotion configured (f36 uses it internally but doesn't expose it to consumers).
164
166
- Prefer `className` over inline `style` unless manipulating dynamic values
|`app-shell.tsx`| Full app chrome | Navbar (from f36-navbar), sidebar (280px, nav items, sections), content area — the outer wrapper most pages sit inside |
258
+
|`list-page.tsx`| List / Index | Table, search, EntityStatusBadge, Menu actions, Pagination, empty state, Skeleton |
259
+
|`detail-page.tsx`| Detail / Edit | Right sidebar, breadcrumbs, form validation, unsaved-changes Note |
260
+
|`settings-page.tsx`| Settings | Grouped sections, Switch toggles, danger zone |
CHECK Every color, spacing, and font value comes from @contentful/f36-tokens — no hardcoded hex, px, or font stacks
270
+
CHECK No CSS import — f36 v6 is self-styling via Emotion. `dist/styles.css` does not exist and will break the build if imported.
271
+
CHECK Every color, spacing, and font value comes from @contentful/f36-tokens — no hardcoded hex, px, or font stacks (exception: shell structure dimensions like sidebar width, border-radius, and nav item padding that have no token equivalent — see base-shell.md)
273
272
CHECK Every icon name exists in @contentful/f36-icons — see guidelines/foundations/icons.md. If unsure, DON'T guess.
274
273
CHECK Every input is inside a FormControl with a Label
275
274
CHECK Only ONE primary button per visible screen section
276
275
CHECK All labels and headings use sentence case — never Title Case or ALL CAPS
277
276
CHECK Destructive confirmation cancel label is "Never mind" — not "Cancel"
278
277
CHECK No usage of Workbench — use Layout instead
279
-
CHECK No fabricated sub-components: Layout only has Layout.Header, Layout.Body, Layout.Sidebar. Skeleton only has Skeleton.Container, Skeleton.DisplayText, Skeleton.BodyText, Skeleton.Image.
278
+
CHECK No fabricated sub-components: Layout only has Layout.Header, Layout.Body, Layout.Sidebar. Skeleton only has Skeleton.Container, Skeleton.DisplayText, Skeleton.BodyText, Skeleton.Image, Skeleton.Row.
279
+
CHECK Every Button and IconButton uses size="small" — never omit (defaults to medium/40px).
0 commit comments