Skip to content

Is there a way to prevent optimizers removing the "min-width" HTML tag? #264

Closed
@enventa

Description

@enventa

When using css-element-queries on a WordPress installation that uses an optimizer plugin (Autoptimize), the custom "min_width" attribute added to the targeted DOM element gets removed.

This is also true for other optimizers. I know the feature that is causing the attribute to be removed is one called "Inline and Defer CSS?".

I just wanted to confirm whether that attribute is set via Javascript. If so, which file is responsible for that?

To avoid issues with that kind of plugins/functionalities, would be an option for you to consider to use valid HTML attributes, like "data-"? Would that make sense?

Thanks!
Vitolo

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