Skip to content

Invalid minification of var() fallback #822

Description

@JaneOri

Playground Input:

div {
  border-radius: 10px var(--foobar, );
}

Actual output

div{border-radius:10px var(--foobar,)}

(the empty fallback in var() is invalid and results in the whole rule being ignored. The space is required)

Expected output

div{border-radius:10px var(--foobar, )}

(must have the space in the fallback value to be valid)

Could be an issue somewhere upstream in postcss - happy to submit a PR either way if someone familiar with the code bases could point me roughly near the code that would be responsible.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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