Skip to content

Config option to opt out of CSS Injection #9465

@wessberg

Description

@wessberg

Description

It is currently possible to opt out of CSS Injection by adding ?inline to the relevant import declarations.

However, for some applications, specifically those that rely on Constructable Stylesheets or more generally applications that rely on Shadow DOM, adding this to the end of every import feels unnecessarily redundant to me.

Suggested solution

It would be nice if a configuration option could be exposed to just never inject any CSS. There is already a few CSS-specific configuration options, and I propose adding an additional option css.inject which defaults to true

Alternative

It can be worked around by adding ?inline to every import declaration referencing a CSS file.

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions