Open stoyan opened 4 months ago
Lightning CSS is a bit lenient here to support quirks mode, where unitless lengths are supported in some properties: https://drafts.csswg.org/css-values-4/#deprecated-quirky-length. Perhaps there should be an option to make this more strict, as mentioned in the code here: https://github.com/parcel-bundler/lightningcss/blob/445def9a77f89aa612fecb2f776261fc2c9d8f66/src/values/length.rs#L145-L148
Currently
becomes
which breaks my UI by turning invalid CSS into a valid one.
(Of course the right thing to do is to fix my origin code to not contain invalid CSS. But in a large project that may take a while and hurt the adoption of LightningCSS.)
I think in this case the correct behavior would be to drop the property completely as its value is incorrect.