Skip to content

Additional whitespace being inserted in var(--foo,) and env(--foo,) #1141

@RobinMalfait

Description

@RobinMalfait

I was bumping the Lightning CSS dependencies in Tailwind CSS, and I noticed that our tests started failing. I noticed that if you have a CSS variable with a fallback, then an additional whitespace character is being inserted. If you then run the output through Lightning CSS again then an additional one is being inserted and so on.

I believe it was related to this commit: 32f1f52 or it least it didn't happen in 1.30.2 and it started happening in 1.31.0.

Input:

.foo {
  transform: var(--bar, );
}

Output v1.31.0

.foo {
  transform: var(--bar,  );
}

Output v1.30.2

.foo {
  transform: var(--bar, );
}

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