Skip to content

fix(card): cards containing <a> inside a heading will no longer propagate to wrapping cards#4360

Merged
Barsnes merged 6 commits intomainfrom
card-with-links-inside-card
Jan 8, 2026
Merged

fix(card): cards containing <a> inside a heading will no longer propagate to wrapping cards#4360
Barsnes merged 6 commits intomainfrom
card-with-links-inside-card

Conversation

@stianmorsund
Copy link
Collaborator

@stianmorsund stianmorsund commented Jan 6, 2026

Summary

Current behavior

Outer card gets hover styles that is intended only for inner card, if the inner card has a heading with a link

New behavior

Hover styles dont propagate to outer cards.

Checks

@changeset-bot
Copy link

changeset-bot bot commented Jan 6, 2026

🦋 Changeset detected

Latest commit: 6dce677

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@digdir/designsystemet-css Patch
@digdir/designsystemet-react Patch
@digdir/designsystemet Patch
@digdir/designsystemet-theme Patch
@digdir/designsystemet-types Patch

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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

Preview deployments for this pull request:

storybook - 6. Jan 2026 - 13:07

@stianmorsund stianmorsund changed the title fix(card): prevent nested cards with heading-link affecting parent hover-style fix(card): hover styles for cards containing <a> inside a heading will no longer propagate to wrapping cards Jan 6, 2026
@Barsnes Barsnes changed the title fix(card): hover styles for cards containing <a> inside a heading will no longer propagate to wrapping cards fix(card): hover for cards containing <a> inside a heading will no longer propagate to wrapping cards Jan 6, 2026
@Barsnes Barsnes changed the title fix(card): hover for cards containing <a> inside a heading will no longer propagate to wrapping cards fix(card): cards containing <a> inside a heading will no longer propagate to wrapping cards Jan 6, 2026
@Barsnes Barsnes merged commit eb2443b into main Jan 8, 2026
18 of 20 checks passed
@Barsnes Barsnes deleted the card-with-links-inside-card branch January 8, 2026 08:49
@github-actions github-actions bot mentioned this pull request Jan 8, 2026
Barsnes pushed a commit that referenced this pull request Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants