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: .claude/skills/components/page-hero-highlights.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,8 +17,8 @@ The layout uses a 4-row CSS Grid with `subgrid` — no `translate`, negative mar
17
17
|`tag`|`"div" \| "section" \| "main"`|`"div"`| Root element tag |
18
18
|`highlightsEqualWidths`|`boolean`|`false`| Equal-width grid columns for highlight items |
19
19
|`highlightsJustify`|`"start" \| "center" \| "end" \| "space-between" \| "space-around"`|`"start"`| Alignment of highlight items along the main axis |
20
-
|`maxWidth`|`boolean`|`false`| When `true`, caps the central column at `--max-width` (default `1064px`). Gutters grow responsively to enforce the constraint. |
21
-
|`contentAlign`|`"start" \| "center"`|`"center"`| When `maxWidth` is `true`: `"center"` grows gutters equally; `"start"` pins content to the left with a fixed left gutter. |
20
+
|`widthConstrained`|`boolean`|`false`| When `true`, caps the central column at `--width-constrained` (default `1064px`). Gutters grow responsively to enforce the constraint. |
21
+
|`contentAlign`|`"start" \| "center"`|`"center"`| When `widthConstrained` is `true`: `"center"` grows gutters equally; `"start"` pins content to the left with a fixed left gutter. |
22
22
|`contentPanel`|`boolean`|`true`| When `true`, renders a decorative panel behind the content slot and offsets the highlights strip. Set to `false` for a flat layout with no backdrop. |
23
23
|`highlightTitleBaseline`|`boolean`|`false`| When `true`, fixes the highlight title row to a set height so titles align at a common baseline. Override `--highlight-title-height` to tune. |
24
24
|`styleClassPassthrough`|`string \| string[]`|`[]`| Extra classes on the root element |
@@ -66,7 +66,7 @@ Each slot accepts any content, but these library components are natural fits:
@@ -172,26 +172,26 @@ By default, highlight items size to their content (`flex-wrap`). Pass `:highligh
172
172
173
173
## Constraining the central column width
174
174
175
-
Pass `:max-width="true"` to cap the content column at `--max-width` (default `1064px`). The gutters grow responsively to enforce it — full-bleed backgrounds are unaffected and `subgrid` continues to work. Use `content-align` to pin to the left or centre:
175
+
Pass `:width-constrained="true"` to cap the content column at `--width-constrained` (default `1064px`). The gutters grow responsively to enforce it — full-bleed backgrounds are unaffected and `subgrid` continues to work. Use `content-align` to pin to the left or centre:
`.header-row` spans cols 1–3, rows 1–2 (edge-to-edge bg). `.header-slot` is placed in row 1 only.
270
270
`.content-row` spans cols 1–3, rows 3–4 (bg fills behind highlights; `.content-slot` is placed in row 4 only). The decorative border behind `.content-slot` is rendered via `.content-row:before` — there is no separate DOM element for it.
271
271
272
-
Grid columns are determined entirely by CSS — no `v-bind`. The `maxWidth` and `contentAlign` props add CSS classes (`max-width`, `start`, `center`) which select the appropriate `grid-template-columns` rule.
272
+
Grid columns are determined entirely by CSS — no `v-bind`. The `widthConstrained` and `contentAlign` props add CSS classes (`width-constrained`, `start`, `center`) which select the appropriate `grid-template-columns` rule.
273
273
274
274
## Layout pitfall: do not use `grid-template-rows: subgrid` inside `.highlights-row`
275
275
@@ -297,5 +297,5 @@ The `.highlights-row` element spans rows 2–3 of the parent grid (the "straddle
297
297
- Component is auto-imported in Nuxt — no import needed.
298
298
- Lives in `app/components/04.templates/page-hero-highlights/`.
-**`contentAlign` has no effect when `maxWidth` is `false`** — both gutters hold their responsive default.
300
+
-**`contentAlign` has no effect when `widthConstrained` is `false`** — both gutters hold their responsive default.
301
301
-**Gutter sizes are CSS tokens** — `--page-hero-highlights-gutter-mobile/tablet/desktop` are all overridable. The responsive switching between them (via `@container`) is handled internally and cannot be overridden.
description: "Justification of highlight items along the main axis",
36
36
},
37
-
maxWidth: {
37
+
widthConstrained: {
38
38
control: "boolean",
39
39
description:
40
40
"When true, caps the central column at --max-width (default 1064px). Gutters grow responsively to enforce the constraint. Override --max-width via styleClassPassthrough to change the cap value.",
@@ -77,7 +77,7 @@ const meta: Meta<StoryArgs> = {
77
77
tag: "div",
78
78
highlightsEqualWidths: false,
79
79
highlightsJustify: "start",
80
-
maxWidth: false,
80
+
widthConstrained: false,
81
81
contentAlign: "center",
82
82
contentPanel: true,
83
83
highlightTitleBaseline: false,
@@ -344,7 +344,7 @@ export const NoSlotContent: Story = {
344
344
/** Max width centered — content column capped at --max-width (1064px) with equal growing gutters either side. */
0 commit comments