Skip to content

Conversation

@joselrio
Copy link
Contributor

@joselrio joselrio commented Jun 17, 2025

Issue number: resolves #


What is the current behavior?

  • The colors were not working on Header and Content when used inside a modal;

What is the new behavior?

  • Added the class selector in-modal to header and content when used inside the modal.
  • Through the added selector, just set the same variable value used under the modal context.

Does this introduce a breaking change?

  • Yes
  • No

Other information

https://ionic-framework-git-rou-11977-v2-ionic1.vercel.app/src/components/modal/test/basic?ionic:theme=ionic

@joselrio joselrio requested a review from a team as a code owner June 17, 2025 09:51
@joselrio joselrio requested a review from thetaPC June 17, 2025 09:51
@vercel
Copy link

vercel bot commented Jun 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 18, 2025 9:49am

@joselrio joselrio changed the base branch from main to next June 17, 2025 09:51
@github-actions github-actions bot added the package: core @ionic/core package label Jun 17, 2025
@joselrio joselrio changed the title fix(header, content): update colors for ionic theme v2 fix(header, content): update colors for ionic theme Jun 17, 2025
Copy link
Member

@ShaneK ShaneK left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Copy link
Contributor

@thetaPC thetaPC left a comment

Choose a reason for hiding this comment

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

These changes don't seem to be necessary as it's working as expected. I would recommend providing a minimal JS environment that shows what the issue is so we can provide a different solution.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why are these changes needed? This is already being set through the modal ionic theme file.

Screenshot 2025-06-18 at 8 33 31 AM

Screenshot 2025-06-18 at 8 33 40 AM

The background is updating as expected when I change it locally:
Screenshot 2025-06-18 at 8 36 17 AM

Copy link
Contributor

Choose a reason for hiding this comment

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

Why are these changes needed? This can already be done through styling:

ion-modal ion-header ion-toolbar {
  --background: pink;
}

We have documentation on best practices for style customization when it comes to modals. I would recommend reviewing that.

@joselrio joselrio closed this Jun 23, 2025
@thetaPC
Copy link
Contributor

thetaPC commented Jun 23, 2025

@joselrio is it safe to delete the branch?

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.

5 participants