lightningcss
lightningcss copied to clipboard
Some invalid CSS values are removed silently, while others are not
Current behavior
Some invalid CSS values are removed silently when re-serialized, but others are not.
Source:
.foo {
/* Value does not exist in the spec. The correct value is `unset` */
border-image: none;
/* Values also do not exist in the spec */
animation-play-state: none;
position: none;
}
Result:
.foo{animation-play-state:none;position:none;border-image:}
Suggested behavior
Should we get a warning that a value is invalid? Or is this the job of a linter used alongside Lightning CSS?
Is it intentional that some invalid values are removed, while others are printed as-is?
Also, thank you for this project! We're very excited to use it in our company.
Related issues:
- https://github.com/parcel-bundler/lightningcss/issues/569: describes bad pseudo-selectors being removed from output
- https://github.com/parcel-bundler/lightningcss/issues/680: describes bad values that remain in the output