Fix Hero picture border radius - #1416
Merged
danielguillan merged 4 commits intoJul 22, 2026
Merged
Conversation
🦋 Changeset detectedLatest commit: 580e9bb The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 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 |
Contributor
🟢 No design token changes found |
There was a problem hiding this comment.
Pull request overview
This PR fixes the Hero media border radius when Hero.Image renders as a <picture> element (where the rounded corners weren’t being applied to the nested <img>), and adds coverage to prevent regressions.
Changes:
- Updated
HeroCSS so an<img>inside.Hero-imageinherits the intended border radius. - Added a Storybook story for the
<picture>variant and a corresponding Playwright visual regression test. - Added a changeset documenting the patch.
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/Hero/Hero.module.css | Applies border-radius: inherit to the nested <img> when .Hero-image is a <picture>. |
| packages/react/src/Hero/Hero.images-videos.stories.tsx | Adds a new “Picture (left + bottom)” story using Hero.Image as="picture". |
| packages/react/src/Hero/Hero.visual.spec.ts | Adds a visual snapshot test for the new “Picture (left + bottom)” story. |
| .changeset/fuzzy-years-smile.md | Publishes the fix as a patch for @primer/react-brand. |
Review details
- Files reviewed: 4/5 changed files
- Comments generated: 0
- Review effort level: Low
Contributor
🟢 Bundle size report
|
Contributor
🟢 No unit test coverage changes foundAll components and hooks with tests maintain the same coverage as the main branch. |
danielguillan
temporarily deployed
to
github-pages
July 22, 2026 09:10 — with
GitHub Actions
Inactive
Contributor
🟢 No visual differences foundOur visual comparison tests did not find any differences in the UI. |
rezrah
approved these changes
Jul 22, 2026
Merged
22 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the missing border radius on
Hero.Imagewhen rendered as apictureelement.This regression was introduced in #1281, when Hero layout classes moved from the nested
imgto thepicturewrapper.List of notable changes:
imgto inherit the computed Hero border radiuspicturestory and visual regression coverageWhat should reviewers focus on?
Picture (left + bottom)story renders the same rounded corners as a regular Hero image.Steps to test:
Screenshots: