Kozea/tinycss2

CSS variables support

Closed this issue · 1 comments

Looks like the serialized output of CSS vars inserts /**/ for some reason. I'm basically doing tinycss2.serialize(tinycss2.parse(css)) and I'm getting the following:

input:

:root {
  --header-height: 300px;
}

.foo {
  height: calc(100vh - var(--header-height) - 64px);
}

output:

:root {
  -/**/-header-height: 300px;
}

.foo {
  height: calc(100vh - var(-/**/-header-height) - 64px);
}

Mozilla docs about CSS vars: https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables

liZe commented

The tokenizer has been updated to allow two dashes at the beginning of ident tokens (as per draft).