Skip to content

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

Open
@jacobg

Description

@jacobg

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: investigationThis issue is waiting on more investigation from the Ionic Team.stencilIssues that require changes in Stenciltype: feature requesta new feature, enhancement, or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      close