Skip to content

feat: allow specifying a css layer for ionic component styles to go in #30369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks done
jacobg opened this issue Apr 21, 2025 · 2 comments
Open
3 tasks done

feat: allow specifying a css layer for ionic component styles to go in #30369

jacobg opened this issue Apr 21, 2025 · 2 comments
Labels
needs: investigation This issue is waiting on more investigation from the Ionic Team. stencil Issues that require changes in Stencil type: feature request a new feature, enhancement, or improvement

Comments

@jacobg
Copy link

jacobg commented Apr 21, 2025

Prerequisites

Describe the Feature Request

Please add ability to specify a css cascade layer for Ionic components (Vue or any framework) to use for styling. Although you can import the core styles into a layer like this:

@import '@ionic/vue/css/core.css' layer(ionic);

But the component-specific styles are importing indirectly via the component (e.g., Vue/Vite), so there is no way to currently specify a layer for them.

Describe the Use Case

Tailwind v4 added native css cascade layers. So if Ionic components style without a layer, then Ionic always overrides private application styles using tailwind. If Ionic were to specify a layer, then it would enable the ability to override the styles.

Describe Preferred Solution

No response

Describe Alternatives

No response

Related Code

No response

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Apr 21, 2025
@brandyscarney brandyscarney added type: feature request a new feature, enhancement, or improvement stencil Issues that require changes in Stencil needs: investigation This issue is waiting on more investigation from the Ionic Team. labels Apr 24, 2025
@christian-bromann
Copy link
Member

@jacobg thanks for raising the issue.

We've discussed this within the team and trying to identify the root problem here. Would you be open to create a minimal reproducible example that outlines the issue at hand to give us a better idea of what we are dealing with. This will also help use to get a better sense whether this should be something we should add to Stencil (the underlying component architecture) or Ionic Framework. Thanks!

@jacobg
Copy link
Author

jacobg commented Apr 24, 2025

@christian-bromann thanks for the quick reply and open this to adding this. OK, I'll work on an example soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: investigation This issue is waiting on more investigation from the Ionic Team. stencil Issues that require changes in Stencil type: feature request a new feature, enhancement, or improvement
Projects
None yet
Development

No branches or pull requests

3 participants