postcss-font-variant icon indicating copy to clipboard operation
postcss-font-variant copied to clipboard

Invalid output produced

Open unconfident opened this issue 3 years ago • 1 comments

Having font-variant set to initial before font-feature-settings property somehow corrupts produced output for font-feature-settings.

Input:

.this-will-be-broken {
   font-variant: initial;
   font-feature-settings: normal;
}

.this-will-not {
  font-variant: normal;
  font-feature-settings: normal;
}

Expected output

Should match the input one to one

Produced output:

.this-will-be-broken {
   font-variant: initial;
   font-feature-settings: normal, ;
}

.this-will-not {
  font-variant: normal;
  font-feature-settings: normal;
}

Observing this on version 4.0.1 but saw the same happen nearly a year ago, before 4.0.1 was released, so I guess at least 4.0.0 is affected as well.

unconfident avatar Apr 28 '21 15:04 unconfident

It took me 2.5 hours to narrow it down to this package. Would have probably been much easier if you had an interactive playground like the ones Typescript and Babel have. I looked around but couldn't find one.

How are you normally triaging issues likes this in the postcss ecosystem?

unconfident avatar Apr 28 '21 15:04 unconfident