Skip to content

css-minifier: CSS custom properties in @supports cannot remove spaces #2020

Closed
@yisibl

Description

@supports (--foo:    ) {
      html { background: green; }
}

esbuild --minify output:

@supports (--foo:){html{background:green}}

Expectation

Browser page shows green background.
After compression, keep at least one space after --foo: , otherwise not valid in Chrome.

See also: https://lea.verou.me/2020/10/the-var-space-hack-to-toggle-multiple-values-with-one-custom-property/

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