Skip to content

CSS variables are wrongly optimized in production #436

Closed
@javiereguiluz

Description

@javiereguiluz

In a CSS file I define several CSS variables, including these:

:root {
    --border-width: 1px;
    --border-style: solid;
    --border-color: #e3e7ee;
}

When using yarn encore dev everything is great ... but with yarn encore production those 3 variables are destroyed and instead, the following wrong CSS is generated:

:root {
    border:1px solid #e3e7ee
}

How can I tell Webpack Encore to not optimize my CSS variables? Thanks!

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