Skip to content

Conversation

@brandyscarney
Copy link
Member

@brandyscarney brandyscarney commented Oct 28, 2025

Issue number: internal


What is the current behavior?

Card content has no encapsulation.

What is the new behavior?

Convert ion-card-content to Shadow DOM which improves consistency among components & CSP compatibility.

Does this introduce a breaking change?

  • Yes
  • No
BREAKING CHANGE:

- **ion-card-content**: The `ion-card-content` component has been updated to Shadow DOM. With this update, all card-related components now use Shadow DOM for style encapsulation. The default styles for heading elements inside `ion-card-content` have been removed. If you need custom styling for headings, you can add your own CSS targeting these elements.

There should not be any breaking changes related to targeting inner elements since ion-card-content does not have any internal elements of its own. However, some user styles may break due to the removal of the card-content-{mode} class or changes in selector specificity. Additionally, the styles targeting heading elements in card-content were removed. Users that wish to have custom styling for headings should add their own CSS targeting them.

@vercel
Copy link

vercel bot commented Oct 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
ionic-framework Ready Ready Preview, Comment Dec 18, 2025 7:57pm

@github-actions github-actions bot added the package: core @ionic/core package label Oct 28, 2025
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left this test in so we would still capture how headings look in cards but since we are no longer styling them directly I can remove them if desired.

@brandyscarney brandyscarney marked this pull request as ready for review December 18, 2025 20:16
@brandyscarney brandyscarney requested a review from a team as a code owner December 18, 2025 20:16
@brandyscarney brandyscarney requested a review from gnbm December 18, 2025 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants