Skip to content

How to unload CSS dynamically (before loading new) #3

@bartvanderwal

Description

@bartvanderwal

Is there anyway to unload a loaded CSS with this package?

This would allow dynamically changing the CSS, for instance based on user input.

I notice on a HTML control/component that I am dynamically loading uses this css loader plugin, that on requiring/loading other .css files later, the styles seems to become 'stacked'. By that I mean that earlier styles are not removed again, only the new .css is put on top of it.

See this screenshot for an explanation. It shows that the order in which .css'es are loaded is of importance, while in my case I want them to be mutually exclusive, i.e. unload old CSS first before loading new (I'm using bootstrap themes).

errorloadingcss

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions