Add duo tone highlighting to Hero.Heading#1262
Conversation
🦋 Changeset detectedLatest commit: 3262fd5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🟢 No design token changes found |
🟢 No unit test coverage changes foundAll components and hooks with tests maintain the same coverage as the main branch. |
There was a problem hiding this comment.
Pull request overview
This PR adds duo tone highlighting support to Hero.Heading component by styling <em> tags with the primary accent color. Unlike other components like River and SectionIntro which use muted text with emphasis bringing it back to default color, Hero uses the accent color for emphasis on default-colored text. The PR also includes infrastructure improvements to the visual regression testing scripts.
Changes:
- Added CSS styling for
<em>tags within Hero.Heading to display in accent-primary color with normalized font-style - Updated visual regression test infrastructure to support running individual tests via command-line arguments
- Added flakey SubNav Anchor Nav Variant test to skip list and removed corresponding test spec
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/Hero/Hero.module.css | Adds styling for em tags within Hero-heading to use accent-primary color and normal font-style |
| packages/react/src/Hero/Hero.examples.stories.tsx | Demonstrates the new duo tone feature with <em> tags in the GridlineExpressiveWithImageCarousel story |
| packages/e2e/scripts/playwright/update-visual-snapshots | Enhances script to accept extra arguments for filtering tests, enabling running individual test files or grep patterns |
| packages/e2e/scripts/playwright/playwright.generate-tests.ts | Adds flakey Anchor Nav Variant test to skip list due to IntersectionObserver timing issues |
| packages/react/src/SubNav/SubNav.visual.spec.ts | Removes Anchor Nav Variant test that's now skipped in the generator |
| .changeset/sour-rockets-drum.md | Documents the new duo tone feature as a patch release with usage example |
|
|
@danielguillan thanks, that's a great point. Updated to support @rfearing please see note above. In the templates we want to enable passthrough for |

Summary
Adds duo tone semantics to the Hero.Heading in the same way as River and other components.
Notable difference is that highlighted text appears in the primary accent color instead of reducing contrast on adjacent text.
🔗 Preview
List of notable changes:
<em>insertion intoHero.HeadingWhat should reviewers focus on?
Steps to test:
Supporting resources (related issues, external links, etc):
Contributor checklist:
update snapshotslabel to the PR)Reviewer checklist:
Screenshots: