Skip to content

Commit a81b3ba

Browse files
authored
Add frosted scrim behind landing hero intro text (#62350)
1 parent d4f860a commit a81b3ba

2 files changed

Lines changed: 24 additions & 10 deletions

File tree

src/landings/components/shared/LandingHero.module.scss

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,24 @@
5050
}
5151
}
5252

53-
// Where the art IS shown, reserve a right-side gutter so the text column wraps
54-
// before it reaches the artwork. Without this, the 48rem text block overlaps
55-
// the right-anchored isometric art in the ~866–1130px band, dropping the muted
56-
// intro to ~1.2:1 over the orange/pink fill (WCAG 1.4.3 AA fail). The art is
57-
// pinned to the border box (background-origin above), so this padding insets
58-
// only the text, not the artwork. 22rem clears the opaque art (~300px) plus a
59-
// gap at every width in the band.
53+
// Where the art IS shown, the intro can extend far enough right to overlap the
54+
// right-anchored isometric art (the heading is short enough that it never
55+
// does). Instead of reserving a right gutter that shrinks the text column, put
56+
// a frosted-glass panel behind the intro so it stays readable over the art
57+
// matching the homepage hero treatment (HomePageHero.module.scss `.content`).
58+
// Guarded to >=866px because the art is hidden below that, so no panel is
59+
// needed on mobile.
6060
@media (min-width: 866px) {
61-
.landingHero {
62-
padding-right: 22rem;
61+
.heroIntroScrim {
62+
display: inline-block;
63+
backdrop-filter: blur(1rem);
64+
background-color: color-mix(
65+
in srgb,
66+
var(--color-canvas-default) 70%,
67+
transparent
68+
);
69+
border-radius: var(--brand-borderRadius-medium, 0.75rem);
70+
padding: 0.5rem 0.75rem;
71+
margin: -0.5rem -0.75rem;
6372
}
6473
}

src/landings/components/shared/LandingHero.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ export const LandingHero = ({ title, intro, heroImage, introLinks }: LandingHero
3333
{title}
3434
</Heading>
3535
{intro && (
36-
<Text as="div" size="200" variant="muted" className={styles.heroDescription}>
36+
<Text
37+
as="div"
38+
size="200"
39+
variant="muted"
40+
className={`${styles.heroDescription} ${styles.heroIntroScrim}`}
41+
>
3742
<RenderedHTML as="div" html={intro} />
3843
</Text>
3944
)}

0 commit comments

Comments
 (0)