lightningcss icon indicating copy to clipboard operation
lightningcss copied to clipboard

BUG: vendor-unprefixed css properties being placed before vendor-prefixed versions

Open iDoNotConsentToBeingTracked opened this issue 7 months ago • 0 comments

LightningCSS is rewriting (unminified):

html{ -webkit-text-size-adjust: none; -moz-text-size-adjust: none; -ms-text-size-adjust: none; -o-text-size-adjust: none; text-size-adjust: none; }

as

html { -webkit-text-size-adjust: none; -moz-text-size-adjust: none; -ms-text-size-adjust: none; text-size-adjust: none; -o-text-size-adjust: none; }

The difference is placement of the vendor-prefixed css property.

Accoring to: https://webhint.io/docs/user-guide/hints/hint-css-prefix-order/

The problem is: "When multiple versions of the same CSS property are specified, the last supported one will be used due to how browsers handle fallback values. This means the order matters when using both vendor-prefixed and unprefixed versions of the same property. Specifically, the unprefixed version must be listed last to ensure standardized behavior takes precedence."