Skip to content

global css should be removed when component which injected it gets destroyed #5530

Open
@raythurnvoid

Description

@raythurnvoid

To Reproduce
https://svelte.dev/repl/385622e1aa2d4dd1a538a649761ef50a?version=3.29.0

Expected behavior
I don't really know if this is working as expected, but in a component oriented context i would expect to work the way i'm describing here: Global CSS injected should be removed after the component that contains it is destroyed.

I say so because in this way i would be allowed to style parent elements conditionally to which child is mounted (like in my repl).
With the actual implementation, i'm stuck to use props or context with store to tell in some way the parent which style should he have.

Information about your Svelte project:
Svelte 3.29.0

Severity
Anonoying

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