srcdev-nuxt-components 9.6.6 → 9.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/components/page-hero-highlights.md +22 -18
- package/.claude/skills/index.md +1 -1
- package/.vscode/srcdev-component-page-hero-highlights.code-snippets +2 -1
- package/app/components/04.templates/page-hero-highlights/CONSUMER-STYLING.md +32 -12
- package/app/components/04.templates/page-hero-highlights/PageHeroHighlights.vue +56 -47
- package/app/components/04.templates/page-hero-highlights/stories/PageHeroHighlights.stories.ts +158 -307
- package/app/components/04.templates/page-hero-highlights/stories/PageHeroHighlightsHeader.stories.ts +10 -0
- package/app/components/04.templates/page-hero-highlights/tests/PageHeroHighlights.spec.ts +49 -27
- package/app/components/04.templates/page-hero-highlights/tests/PageHeroHighlightsHeader.spec.ts +42 -7
- package/app/components/04.templates/page-hero-highlights/tests/__snapshots__/PageHeroHighlights.spec.ts.snap +12 -10
- package/package.json +1 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# PageHeroHighlights Component
|
|
2
2
|
|
|
3
|
+
> **Changed 2026-10-16:** `widthConstrained` was inverted in the CSS since it was first added (`true` gave full width, `false` capped the column); it now does what this doc always said. The tablet/desktop gutters never applied (their `@container` queries had no container): the root is now a named `page-hero-highlights` inline-size container and the rows sit in a `.page-hero-highlights-grid` wrapper. Colour defaults are light theme tokens (were `darkblue`/`white`/`black`/`--slate-*`). Equal-width highlights wrap below `--page-hero-highlights-item-min-width` (12rem). Grid tracks are `minmax(0, …)` and items get `overflow-wrap: anywhere`.
|
|
4
|
+
|
|
3
5
|
> **Changed 2026-09-28:** styles are now in `@layer components` (they were unlayered). Every token is `--page-hero-highlights-*` with its default as a `var()` fallback, so it can be set on the component or any ancestor (previously declared on the root with generic names like `--max-width`, `--highlight-border`, so ancestor values never landed). Inner classes are prefixed (`.page-hero-highlights-header-row`, `-header-slot`, `-strip`, `-content-row`, `-content-slot`); the content-align root classes are `.content-align-start`/`.content-align-center` (were bare `.start`/`.center`); the highlight contract classes are `.page-hero-highlights-item`, `-item-title`, `-item-body` (were `.highlight`, `.title`, `.body`); PageHeroHighlightsHeader uses `.page-hero-highlights-header-start`/`-end` and `--page-hero-highlights-header-*` tokens (were `.phh-*` / `--phh-*`). Full token reference: `CONSUMER-STYLING.md` in the component folder.
|
|
4
6
|
|
|
5
7
|
## Overview
|
|
@@ -19,7 +21,7 @@ The layout uses a 4-row CSS Grid with `subgrid` — no `translate`, negative mar
|
|
|
19
21
|
| `tag` | `"div" \| "section" \| "main"` | `"div"` | Root element tag |
|
|
20
22
|
| `highlightsEqualWidths` | `boolean` | `false` | Equal-width grid columns for highlight items |
|
|
21
23
|
| `highlightsJustify` | `"start" \| "center" \| "end" \| "space-between" \| "space-around"` | `"start"` | Alignment of highlight items along the main axis |
|
|
22
|
-
| `widthConstrained` | `boolean` | `false` | When `true`, caps the central column at `--width
|
|
24
|
+
| `widthConstrained` | `boolean` | `false` | When `true`, caps the central column at `--page-hero-highlights-max-width` (default `1064px`). Gutters grow responsively to enforce the constraint. |
|
|
23
25
|
| `contentAlign` | `"start" \| "center"` | `"center"` | When `widthConstrained` is `true`: `"center"` grows gutters equally; `"start"` pins content to the left with a fixed left gutter. |
|
|
24
26
|
| `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. |
|
|
25
27
|
| `highlightTitleBaseline`| `boolean` | `false` | When `true`, fixes the highlight title row to a set height so titles align at a common baseline. Override `--page-hero-highlights-title-height` to tune. |
|
|
@@ -166,7 +168,7 @@ See [component-aria-landmark.md](../component-aria-landmark.md) for the full pat
|
|
|
166
168
|
|
|
167
169
|
## Equal-width highlights
|
|
168
170
|
|
|
169
|
-
By default, highlight items size to their content (`flex-wrap`). Pass `:highlights-equal-widths="true"` to switch to a grid where all items share equal column widths:
|
|
171
|
+
By default, highlight items size to their content (`flex-wrap`). Pass `:highlights-equal-widths="true"` to switch to a grid where all items share equal column widths (`repeat(auto-fit, minmax(min(100%, --page-hero-highlights-item-min-width), 1fr))`), wrapping onto new rows when they'd get narrower than the min width (default `12rem`):
|
|
170
172
|
|
|
171
173
|
```vue
|
|
172
174
|
<PageHeroHighlights :highlights-equal-widths="true">
|
|
@@ -176,10 +178,10 @@ By default, highlight items size to their content (`flex-wrap`). Pass `:highligh
|
|
|
176
178
|
|
|
177
179
|
## Constraining the central column width
|
|
178
180
|
|
|
179
|
-
Pass `:width-constrained="true"` to cap the content column at `--width
|
|
181
|
+
Pass `:width-constrained="true"` to cap the content column at `--page-hero-highlights-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:
|
|
180
182
|
|
|
181
183
|
```vue
|
|
182
|
-
<!-- Centred, capped at --width
|
|
184
|
+
<!-- Centred, capped at --page-hero-highlights-max-width (1064px) -->
|
|
183
185
|
<PageHeroHighlights :width-constrained="true" content-align="center">...</PageHeroHighlights>
|
|
184
186
|
|
|
185
187
|
<!-- Left-pinned (right side takes remaining space) -->
|
|
@@ -190,12 +192,12 @@ The maximum width value and gutter sizes are all CSS tokens — override them vi
|
|
|
190
192
|
|
|
191
193
|
```css
|
|
192
194
|
.my-page-hero {
|
|
193
|
-
--width
|
|
195
|
+
--page-hero-highlights-max-width: 1200px;
|
|
194
196
|
--page-hero-highlights-gutter-desktop: 48px;
|
|
195
197
|
}
|
|
196
198
|
```
|
|
197
199
|
|
|
198
|
-
See [css-grid-width-
|
|
200
|
+
See [css-grid-max-width-gutters.md](../css-grid-max-width-gutters.md) for the underlying pattern explanation.
|
|
199
201
|
|
|
200
202
|
## Local style override scaffold
|
|
201
203
|
|
|
@@ -215,40 +217,41 @@ See [component-local-style-override.md](../component-local-style-override.md) fo
|
|
|
215
217
|
.page-hero-highlights {
|
|
216
218
|
&.my-page-hero {
|
|
217
219
|
/* Grid layout */
|
|
218
|
-
/* --width
|
|
220
|
+
/* --page-hero-highlights-max-width: 1064px; */
|
|
219
221
|
/* --page-hero-highlights-gutter-mobile: 16px; */
|
|
220
222
|
/* --page-hero-highlights-gutter-tablet: 40px; */
|
|
221
223
|
/* --page-hero-highlights-gutter-desktop: 32px; */
|
|
222
224
|
|
|
223
225
|
/* Header zone */
|
|
224
|
-
/* --page-hero-highlights-header-background:
|
|
226
|
+
/* --page-hero-highlights-header-background: var(--theme-surface-subtle); */
|
|
225
227
|
|
|
226
228
|
/* Highlights strip */
|
|
227
229
|
/* --page-hero-highlights-strip-gap: 1rem; */
|
|
228
230
|
/* --page-hero-highlights-strip-inset: 1.2rem; */
|
|
231
|
+
/* --page-hero-highlights-item-min-width: 12rem; */ /* equal-widths wrap point */
|
|
229
232
|
|
|
230
233
|
/* Highlight cards */
|
|
231
234
|
/* --page-hero-highlights-item-rows-gap: 1.2rem; */
|
|
232
235
|
/* --page-hero-highlights-title-height: 1fr; */ /* see: highlight-title-baseline prop */
|
|
233
236
|
/* --page-hero-highlights-item-padding-block-start: 1.2rem; */
|
|
234
237
|
/* --page-hero-highlights-item-padding: 1.2rem; */
|
|
235
|
-
/* --page-hero-highlights-item-background:
|
|
236
|
-
/* --page-hero-highlights-item-border: 1px solid
|
|
238
|
+
/* --page-hero-highlights-item-background: var(--page-bg, Canvas); */
|
|
239
|
+
/* --page-hero-highlights-item-border: 1px solid var(--theme-border); */
|
|
237
240
|
/* --page-hero-highlights-item-border-radius: 8px; */
|
|
238
|
-
/* --page-hero-highlights-item-colour:
|
|
241
|
+
/* --page-hero-highlights-item-colour: var(--theme-text); */
|
|
239
242
|
|
|
240
243
|
/* Content zone */
|
|
241
|
-
/* --page-hero-highlights-content-background:
|
|
244
|
+
/* --page-hero-highlights-content-background: transparent; */
|
|
242
245
|
/* --page-hero-highlights-content-start-gap: 1.2rem; */
|
|
243
246
|
/* --page-hero-highlights-content-end-gap: 1.2rem; */
|
|
244
247
|
|
|
245
248
|
/* Content slot decorative border */
|
|
246
249
|
/* --page-hero-highlights-content-margin-block-start: 2.4rem; */
|
|
247
250
|
/* --page-hero-highlights-content-margin: var(--page-hero-highlights-strip-inset); */
|
|
248
|
-
/* --page-hero-highlights-panel-background: var(--
|
|
249
|
-
/* --page-hero-highlights-panel-border: 1px solid var(--
|
|
251
|
+
/* --page-hero-highlights-panel-background: var(--theme-surface-subtle); */
|
|
252
|
+
/* --page-hero-highlights-panel-border: 1px solid var(--theme-border); */
|
|
250
253
|
/* --page-hero-highlights-panel-border-radius: 0.8rem; */
|
|
251
|
-
/* --page-hero-highlights-panel-outline:
|
|
254
|
+
/* --page-hero-highlights-panel-outline: none; */
|
|
252
255
|
|
|
253
256
|
/* When using :highlight-title-baseline="true" */
|
|
254
257
|
/* --page-hero-highlights-title-height-baseline: 4rem; */ /* proportional value preferred */
|
|
@@ -268,10 +271,10 @@ row3: highlights bottom half
|
|
|
268
271
|
row4: page content (never underflows highlights)
|
|
269
272
|
```
|
|
270
273
|
|
|
271
|
-
`.page-hero-highlights-header-row` spans cols 1–3, rows 1–2 (edge-to-edge bg). `.page-hero-highlights-header-slot` is placed in row 1 only.
|
|
274
|
+
All of these sit in `.page-hero-highlights-grid`, the grid inside the root (the root is the size container). `.page-hero-highlights-header-row` spans cols 1–3, rows 1–2 (edge-to-edge bg). `.page-hero-highlights-header-slot` is placed in row 1 only.
|
|
272
275
|
`.page-hero-highlights-content-row` spans cols 1–3, rows 3–4 (bg fills behind highlights; `.page-hero-highlights-content-slot` is placed in row 4 only). The decorative border behind `.page-hero-highlights-content-slot` is rendered via `.page-hero-highlights-content-row::before` — there is no separate DOM element for it.
|
|
273
276
|
|
|
274
|
-
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
|
|
277
|
+
Grid columns are determined entirely by CSS — no `v-bind`. The `widthConstrained` and `contentAlign` props add CSS classes (`width-constrained`, `content-align-start`, `content-align-center`) on the root, which select the `grid-template-columns` rule on `.page-hero-highlights-grid`.
|
|
275
278
|
|
|
276
279
|
## Layout pitfall: do not use `grid-template-rows: subgrid` inside `.page-hero-highlights-strip`
|
|
277
280
|
|
|
@@ -300,4 +303,5 @@ The `.page-hero-highlights-strip` element spans rows 2–3 of the parent grid (t
|
|
|
300
303
|
- Lives in `app/components/04.templates/page-hero-highlights/`.
|
|
301
304
|
- Storybook title: `"Templates/PageHeroHighlights"`.
|
|
302
305
|
- **`contentAlign` has no effect when `widthConstrained` is `false`** — both gutters hold their responsive default.
|
|
303
|
-
- **Gutter sizes are CSS tokens** — `--page-hero-highlights-gutter-mobile/tablet/desktop` are all overridable.
|
|
306
|
+
- **Gutter sizes are CSS tokens** — `--page-hero-highlights-gutter-mobile/tablet/desktop` are all overridable. They switch at 768px and 1024px of the component's own width (`@container page-hero-highlights`); the breakpoints themselves aren't tokens.
|
|
307
|
+
- **The root is an inline-size container**, so it can't size from its content: as a flex or grid item give it `inline-size: 100%` or a track. A grid on the root itself was moved to `.page-hero-highlights-grid` for this (an element can't query its own size).
|
package/.claude/skills/index.md
CHANGED
|
@@ -88,7 +88,7 @@ Each skill is a single markdown file named `<area>-<task>.md`.
|
|
|
88
88
|
├── link-text.md — LinkText props, slots, usage patterns, styling
|
|
89
89
|
├── header-block.md — HeaderBlock: tagLevel/classLevel semantic-vs-visual heading decoupling, page-heading-N utility classes
|
|
90
90
|
├── text-block.md — TextBlock: vertical-rhythm text wrapper, --text-block-padding-block-start/-end tokens, heading-id slot prop for section/article aria-labelledby
|
|
91
|
-
├── page-hero-highlights.md — PageHeroHighlights template: hero + highlights strip grid,
|
|
91
|
+
├── page-hero-highlights.md — PageHeroHighlights template: hero + straddling highlights strip grid (root is the `page-hero-highlights` container, grid in `.page-hero-highlights-grid`), widthConstrained caps the column, equal-width highlights wrap at --page-hero-highlights-item-min-width, light theme-token defaults, PageHeroHighlightsHeader companion
|
|
92
92
|
├── slider-gallery.md — SliderGallery: full-screen image carousel, IGalleryData, pause-on-hover/reduced-motion auto-advance, prefixed classes, CSS tokens
|
|
93
93
|
├── services-card.md — ServicesCard props (incl. eyebrowConfig/heroConfig), actions slot, CSS tokens, page boilerplate
|
|
94
94
|
├── google-reviews.md — GoogleReviews + GoogleReviewCard: Google Places reviews in a scrolling row; env vars, server route, useGoogleReviews, props, slots, tokens, Google terms
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "PageHeroHighlights: header zone, straddling highlights strip, content panel",
|
|
4
4
|
"scope": "vue,html",
|
|
5
5
|
"body": [
|
|
6
|
-
"<PageHeroHighlights tag=\"section\" content-align=\"${1|center,start|}\">",
|
|
6
|
+
"<PageHeroHighlights tag=\"section\" :width-constrained=\"true\" content-align=\"${1|center,start|}\">",
|
|
7
7
|
" <template #header=\"{ headingId }\">",
|
|
8
8
|
" <PageHeroHighlightsHeader>",
|
|
9
9
|
" <template #start><h1 :id=\"headingId\">$2</h1></template>",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
" --page-hero-highlights-content-background: $3;",
|
|
32
32
|
" --page-hero-highlights-item-background: $4;",
|
|
33
33
|
" --page-hero-highlights-max-width: $5;",
|
|
34
|
+
" --page-hero-highlights-item-min-width: $6;",
|
|
34
35
|
"}"
|
|
35
36
|
]
|
|
36
37
|
}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
| Token | Default | Controls |
|
|
8
8
|
|---|---|---|
|
|
9
|
-
| `--page-hero-highlights-max-width` | `1064px` | Central column cap
|
|
9
|
+
| `--page-hero-highlights-max-width` | `1064px` | Central column cap with `width-constrained` |
|
|
10
10
|
| `--page-hero-highlights-gutter-mobile` | `16px` | Side gutter |
|
|
11
|
-
| `--page-hero-highlights-gutter-tablet` | `40px` | Side gutter at 768px+
|
|
12
|
-
| `--page-hero-highlights-gutter-desktop` | `32px` | Side gutter at 1024px+ |
|
|
13
|
-
| `--page-hero-highlights-header-background` | `
|
|
14
|
-
| `--page-hero-highlights-content-background` | `
|
|
11
|
+
| `--page-hero-highlights-gutter-tablet` | `40px` | Side gutter at 768px+ of the component's width |
|
|
12
|
+
| `--page-hero-highlights-gutter-desktop` | `32px` | Side gutter at 1024px+ of the component's width |
|
|
13
|
+
| `--page-hero-highlights-header-background` | `var(--theme-surface-subtle)` | Header zone background |
|
|
14
|
+
| `--page-hero-highlights-content-background` | `transparent` | Content zone background |
|
|
15
15
|
| `--page-hero-highlights-content-start-gap` | `1.2rem` | Space above the content panel |
|
|
16
16
|
| `--page-hero-highlights-content-end-gap` | `1.2rem` | Space below the content zone |
|
|
17
17
|
| `--page-hero-highlights-content-margin-block-start` | `2.4rem` | Space above the content slot |
|
|
@@ -23,24 +23,25 @@
|
|
|
23
23
|
|---|---|---|
|
|
24
24
|
| `--page-hero-highlights-strip-gap` | `1rem` | Gap between highlight items |
|
|
25
25
|
| `--page-hero-highlights-strip-inset` | `1.2rem` | Strip inline inset (with the content panel) |
|
|
26
|
+
| `--page-hero-highlights-item-min-width` | `12rem` | Narrowest an item gets with `highlights-equal-widths` before the strip wraps to a new row |
|
|
26
27
|
| `--page-hero-highlights-title-height` | `1fr` | Title row height |
|
|
27
28
|
| `--page-hero-highlights-title-height-baseline` | `4rem` | Title row height with `highlight-title-baseline` |
|
|
28
29
|
| `--page-hero-highlights-item-padding` | `1.2rem` | Item padding |
|
|
29
30
|
| `--page-hero-highlights-item-padding-block-start` | the item padding | Item top padding |
|
|
30
31
|
| `--page-hero-highlights-item-padding-block-start-baseline` | `0` | Item top padding with `highlight-title-baseline` |
|
|
31
32
|
| `--page-hero-highlights-item-rows-gap` | `1.2rem` | Gap between item title and body |
|
|
32
|
-
| `--page-hero-highlights-item-background` | `
|
|
33
|
-
| `--page-hero-highlights-item-border` | `1px solid
|
|
33
|
+
| `--page-hero-highlights-item-background` | `var(--page-bg, Canvas)` | Item background |
|
|
34
|
+
| `--page-hero-highlights-item-border` | `1px solid var(--theme-border)` | Item border |
|
|
34
35
|
| `--page-hero-highlights-item-border-radius` | `8px` | Item rounding |
|
|
35
|
-
| `--page-hero-highlights-item-colour` | `
|
|
36
|
+
| `--page-hero-highlights-item-colour` | `var(--theme-text)` | Item text colour |
|
|
36
37
|
|
|
37
38
|
### Content panel (`content-panel`, on by default)
|
|
38
39
|
|
|
39
40
|
| Token | Default | Controls |
|
|
40
41
|
|---|---|---|
|
|
41
|
-
| `--page-hero-highlights-panel-background` | `var(--
|
|
42
|
-
| `--page-hero-highlights-panel-border` | `1px solid var(--
|
|
43
|
-
| `--page-hero-highlights-panel-outline` | `
|
|
42
|
+
| `--page-hero-highlights-panel-background` | `var(--theme-surface-subtle)` | Panel background |
|
|
43
|
+
| `--page-hero-highlights-panel-border` | `1px solid var(--theme-border)` | Panel border |
|
|
44
|
+
| `--page-hero-highlights-panel-outline` | `none` | Panel outline |
|
|
44
45
|
| `--page-hero-highlights-panel-border-radius` | `0.8rem` | Panel rounding |
|
|
45
46
|
|
|
46
47
|
### PageHeroHighlightsHeader
|
|
@@ -56,6 +57,20 @@
|
|
|
56
57
|
Private (not public API): `--_max-width`, `--_gutter`, `--_strip-inset`, `--_title-height`,
|
|
57
58
|
`--_item-padding`, `--_item-padding-block-start`, `--_header-slot-grid-row`.
|
|
58
59
|
|
|
60
|
+
> Changed 2026-10-16:
|
|
61
|
+
>
|
|
62
|
+
> - `width-constrained` was inverted: `true` gave a full-width column and `false` capped it at
|
|
63
|
+
> `--page-hero-highlights-max-width`, the opposite of every doc. It now matches the docs (`true` caps it,
|
|
64
|
+
> `content-align` applies). Flip any `width-constrained` you set to get the old look.
|
|
65
|
+
> - The tablet and desktop gutters never applied: their `@container` queries had no container to
|
|
66
|
+
> match. The root is now a named `page-hero-highlights` inline-size container and the rows sit in a
|
|
67
|
+
> new `.page-hero-highlights-grid` wrapper, so the gutters step at the component's own width.
|
|
68
|
+
> - Colour defaults are light, from theme tokens (were `darkblue`, `white`, `black` and `--slate-*`):
|
|
69
|
+
> set the header, item and panel tokens to keep a dark header.
|
|
70
|
+
> - `highlights-equal-widths` now wraps onto new rows below `--page-hero-highlights-item-min-width`
|
|
71
|
+
> instead of squeezing every item into one row, and grid tracks are `minmax(0, …)` so long
|
|
72
|
+
> unbroken text can't widen the layout. Highlight items get `overflow-wrap: anywhere`.
|
|
73
|
+
>
|
|
59
74
|
> Changed 2026-09-28: every token used to be declared on the root with its value, under generic
|
|
60
75
|
> names (`--max-width`, `--header-row-background-colour`, `--highlight-*`, `--content-row-*`,
|
|
61
76
|
> `--content-slot-*`, `--phh-*`), so a value set on an ancestor never landed and the names could
|
|
@@ -74,7 +89,7 @@ Private (not public API): `--_max-width`, `--_gutter`, `--_strip-inset`, `--_tit
|
|
|
74
89
|
| `.highlight-title-baseline` | root | `highlight-title-baseline` |
|
|
75
90
|
| `.equal-widths` / `.flexible-widths`, `.justify-*` | `.page-hero-highlights-strip` | `highlights-equal-widths`, `highlights-justify` |
|
|
76
91
|
|
|
77
|
-
Inner classes: `.page-hero-highlights-header-row`, `.page-hero-highlights-header-slot`,
|
|
92
|
+
Inner classes: `.page-hero-highlights-grid` (the grid itself, inside the root), `.page-hero-highlights-header-row`, `.page-hero-highlights-header-slot`,
|
|
78
93
|
`.page-hero-highlights-strip`, `.page-hero-highlights-content-row` (its `::before` is the content
|
|
79
94
|
panel), `.page-hero-highlights-content-slot`; header component `.page-hero-highlights-header-start`,
|
|
80
95
|
`.page-hero-highlights-header-end`.
|
|
@@ -96,6 +111,11 @@ Set the tokens above on an element you own (a page or section class, or a class
|
|
|
96
111
|
`<style scoped>`, tokens set on your element still work, but selectors that reach inside the component need
|
|
97
112
|
`:deep()`. Patterns and examples: `.claude/skills/component-local-style-override.md`.
|
|
98
113
|
|
|
114
|
+
**Caveat:** the root is an inline-size container (`container: page-hero-highlights / inline-size`), so it
|
|
115
|
+
can't size itself from its content: give it a width from its context (a block in normal flow is fine; as a
|
|
116
|
+
flex or grid item give it `inline-size: 100%` or a track). The highlight item padding tokens are
|
|
117
|
+
re-declared by `highlight-title-baseline`, so with that prop on, set the `-baseline` variants.
|
|
118
|
+
|
|
99
119
|
---
|
|
100
120
|
|
|
101
121
|
## Class passthrough
|
|
@@ -5,17 +5,19 @@
|
|
|
5
5
|
:class="[elementClasses, componentClasses]"
|
|
6
6
|
:aria-labelledby="ariaLabelledby"
|
|
7
7
|
>
|
|
8
|
-
<div class="page-hero-highlights-
|
|
9
|
-
<div class="page-hero-highlights-header-
|
|
10
|
-
<
|
|
8
|
+
<div class="page-hero-highlights-grid">
|
|
9
|
+
<div class="page-hero-highlights-header-row">
|
|
10
|
+
<div class="page-hero-highlights-header-slot">
|
|
11
|
+
<slot name="header" :heading-id="headingId"></slot>
|
|
12
|
+
</div>
|
|
11
13
|
</div>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
<div class="page-hero-highlights-strip" :class="highlightClasses">
|
|
15
|
+
<slot name="highlights"></slot>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="page-hero-highlights-content-row">
|
|
18
|
+
<div class="page-hero-highlights-content-slot">
|
|
19
|
+
<slot name="content"></slot>
|
|
20
|
+
</div>
|
|
19
21
|
</div>
|
|
20
22
|
</div>
|
|
21
23
|
</component>
|
|
@@ -79,13 +81,7 @@ watch(
|
|
|
79
81
|
--_item-padding-block-start: var(--page-hero-highlights-item-padding-block-start, var(--_item-padding));
|
|
80
82
|
--_header-slot-grid-row: 1;
|
|
81
83
|
|
|
82
|
-
|
|
83
|
-
--_gutter: var(--page-hero-highlights-gutter-tablet, 40px);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
@container (width >= 1024px) {
|
|
87
|
-
--_gutter: var(--page-hero-highlights-gutter-desktop, 32px);
|
|
88
|
-
}
|
|
84
|
+
container: page-hero-highlights / inline-size;
|
|
89
85
|
|
|
90
86
|
&.highlight-title-baseline {
|
|
91
87
|
--_title-height: var(--page-hero-highlights-title-height-baseline, 4rem);
|
|
@@ -93,38 +89,44 @@ watch(
|
|
|
93
89
|
--_header-slot-grid-row: 1 / span 2;
|
|
94
90
|
}
|
|
95
91
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
grid-template-columns: var(--_gutter) 1fr var(--_gutter);
|
|
102
|
-
}
|
|
92
|
+
.page-hero-highlights-grid {
|
|
93
|
+
display: grid;
|
|
94
|
+
grid-template-rows: auto var(--_title-height) 1fr auto;
|
|
95
|
+
grid-template-columns: var(--_gutter) minmax(0, 1fr) var(--_gutter);
|
|
96
|
+
gap: 0;
|
|
103
97
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
grid-template-columns: var(--_gutter) minmax(0, var(--_max-width)) minmax(var(--_gutter), 1fr);
|
|
98
|
+
@container page-hero-highlights (width >= 768px) {
|
|
99
|
+
--_gutter: var(--page-hero-highlights-gutter-tablet, 40px);
|
|
107
100
|
}
|
|
108
101
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
max(var(--_gutter), (100% - var(--_max-width)) / 2)
|
|
112
|
-
1fr
|
|
113
|
-
max(var(--_gutter), (100% - var(--_max-width)) / 2);
|
|
102
|
+
@container page-hero-highlights (width >= 1024px) {
|
|
103
|
+
--_gutter: var(--page-hero-highlights-gutter-desktop, 32px);
|
|
114
104
|
}
|
|
115
105
|
}
|
|
116
106
|
|
|
107
|
+
&.width-constrained.content-align-start .page-hero-highlights-grid {
|
|
108
|
+
grid-template-columns: var(--_gutter) minmax(0, var(--_max-width)) minmax(var(--_gutter), 1fr);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&.width-constrained.content-align-center .page-hero-highlights-grid {
|
|
112
|
+
grid-template-columns:
|
|
113
|
+
max(var(--_gutter), (100% - var(--_max-width)) / 2)
|
|
114
|
+
minmax(0, 1fr)
|
|
115
|
+
max(var(--_gutter), (100% - var(--_max-width)) / 2);
|
|
116
|
+
}
|
|
117
|
+
|
|
117
118
|
.page-hero-highlights-header-row {
|
|
118
119
|
grid-column: 1 / -1;
|
|
119
120
|
grid-row: 1 / 3;
|
|
120
121
|
display: grid;
|
|
121
122
|
grid-template-columns: subgrid;
|
|
122
123
|
grid-template-rows: subgrid;
|
|
123
|
-
background-color: var(--page-hero-highlights-header-background,
|
|
124
|
+
background-color: var(--page-hero-highlights-header-background, var(--theme-surface-subtle));
|
|
124
125
|
|
|
125
126
|
.page-hero-highlights-header-slot {
|
|
126
127
|
grid-column: 2;
|
|
127
128
|
grid-row: var(--_header-slot-grid-row);
|
|
129
|
+
min-inline-size: 0;
|
|
128
130
|
container-type: inline-size;
|
|
129
131
|
}
|
|
130
132
|
}
|
|
@@ -134,19 +136,27 @@ watch(
|
|
|
134
136
|
grid-row: 2 / 4;
|
|
135
137
|
position: relative;
|
|
136
138
|
z-index: 1;
|
|
139
|
+
min-inline-size: 0;
|
|
137
140
|
gap: var(--page-hero-highlights-strip-gap, 1rem);
|
|
138
141
|
margin-inline-start: 0;
|
|
139
142
|
|
|
140
143
|
&.equal-widths {
|
|
141
144
|
display: grid;
|
|
142
|
-
grid-
|
|
143
|
-
|
|
145
|
+
grid-template-columns: repeat(
|
|
146
|
+
auto-fit,
|
|
147
|
+
minmax(min(100%, var(--page-hero-highlights-item-min-width, 12rem)), 1fr)
|
|
148
|
+
);
|
|
144
149
|
}
|
|
145
150
|
|
|
146
151
|
&.flexible-widths {
|
|
147
152
|
display: flex;
|
|
148
153
|
flex-wrap: wrap;
|
|
149
154
|
justify-content: center;
|
|
155
|
+
|
|
156
|
+
& > * {
|
|
157
|
+
min-inline-size: 0;
|
|
158
|
+
max-inline-size: 100%;
|
|
159
|
+
}
|
|
150
160
|
}
|
|
151
161
|
|
|
152
162
|
&.justify-start {
|
|
@@ -173,18 +183,19 @@ watch(
|
|
|
173
183
|
display: grid;
|
|
174
184
|
grid-template-rows: subgrid;
|
|
175
185
|
grid-auto-flow: row;
|
|
186
|
+
overflow-wrap: anywhere;
|
|
176
187
|
padding-block: var(--_item-padding-block-start) var(--_item-padding);
|
|
177
188
|
padding-inline: var(--_item-padding);
|
|
178
|
-
background-color: var(--page-hero-highlights-item-background,
|
|
179
|
-
border: var(--page-hero-highlights-item-border, 1px solid
|
|
189
|
+
background-color: var(--page-hero-highlights-item-background, var(--page-bg, Canvas));
|
|
190
|
+
border: var(--page-hero-highlights-item-border, 1px solid var(--theme-border));
|
|
180
191
|
border-radius: var(--page-hero-highlights-item-border-radius, 8px);
|
|
181
|
-
color: var(--page-hero-highlights-item-colour,
|
|
192
|
+
color: var(--page-hero-highlights-item-colour, var(--theme-text));
|
|
182
193
|
|
|
183
194
|
.page-hero-highlights-item-title {
|
|
184
195
|
display: grid;
|
|
185
196
|
grid-row: 2;
|
|
186
197
|
align-items: end;
|
|
187
|
-
|
|
198
|
+
block-size: var(--_title-height);
|
|
188
199
|
}
|
|
189
200
|
|
|
190
201
|
.page-hero-highlights-item-body {
|
|
@@ -202,12 +213,13 @@ watch(
|
|
|
202
213
|
grid-template-rows: subgrid;
|
|
203
214
|
position: relative;
|
|
204
215
|
isolation: isolate;
|
|
205
|
-
background-color: var(--page-hero-highlights-content-background,
|
|
216
|
+
background-color: var(--page-hero-highlights-content-background, transparent);
|
|
206
217
|
padding-block-end: var(--page-hero-highlights-content-end-gap, 1.2rem);
|
|
207
218
|
|
|
208
219
|
.page-hero-highlights-content-slot {
|
|
209
220
|
grid-column: 2;
|
|
210
221
|
grid-row: 2;
|
|
222
|
+
min-inline-size: 0;
|
|
211
223
|
margin-block: var(--page-hero-highlights-content-margin-block-start, 2.4rem)
|
|
212
224
|
var(--page-hero-highlights-content-margin, var(--_strip-inset));
|
|
213
225
|
margin-inline: 0;
|
|
@@ -222,15 +234,12 @@ watch(
|
|
|
222
234
|
.page-hero-highlights-content-row {
|
|
223
235
|
&::before {
|
|
224
236
|
content: "";
|
|
225
|
-
display: grid;
|
|
226
|
-
grid-template-columns: subgrid;
|
|
227
|
-
grid-template-rows: subgrid;
|
|
228
237
|
grid-column: 2;
|
|
229
238
|
grid-row: 1 / span 2;
|
|
230
|
-
margin-
|
|
231
|
-
background-color: var(--page-hero-highlights-panel-background, var(--
|
|
232
|
-
border: var(--page-hero-highlights-panel-border, 1px solid var(--
|
|
233
|
-
outline: var(--page-hero-highlights-panel-outline,
|
|
239
|
+
margin-block-start: var(--page-hero-highlights-content-start-gap, 1.2rem);
|
|
240
|
+
background-color: var(--page-hero-highlights-panel-background, var(--theme-surface-subtle));
|
|
241
|
+
border: var(--page-hero-highlights-panel-border, 1px solid var(--theme-border));
|
|
242
|
+
outline: var(--page-hero-highlights-panel-outline, none);
|
|
234
243
|
border-radius: var(--page-hero-highlights-panel-border-radius, 0.8rem);
|
|
235
244
|
}
|
|
236
245
|
|