Skip to content

base layer messing with custom elements #16208

Closed
@vdegenne

Description

@vdegenne

What version of Tailwind CSS are you using?

^4.0.3

What build tool (or framework if it abstracts the build tool) are you using?

just tailwindcss and native html features.

What version of Node.js are you using?

v23.4.0

What browser are you using?

Chrome

What operating system are you using?

Fedora 41

Describe your issue

I've talked about that before in this issue. When applying a stylesheet transformed by tailwindcss to a custom element the styles were not applied to the custom element because it was not using the :host namespace.

Similarly now, the base layer is widely spread into the custom elements which breaks all the private styles:

Image

One solution would be to enclose the base layer styles into :root.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions