hudochenkov / stylelint-order

A plugin pack of order related linting rules for Stylelint.
MIT License
916 stars 61 forks source link

Allow vendor prefixed properties to come before others when sorting alphabetically #161

Closed viveleroi closed 2 years ago

viveleroi commented 2 years ago

Our app has the following block:

body {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    color: #363E47;
}

This plugin is warning that the vendor-prefixed properties are out of order, but this is the order we want. I don't see any way to fix this as-is.

hudochenkov commented 2 years ago

Prefixes kind of ignored to determine an order. Both -moz-osx-font-smoothing and -webkit-font-smoothing are treated as font-smoothing. It makes clear that font-smoothing should be after color alphabetically.

viveleroi commented 2 years ago

So there's no way to force the order we desire (prefixed first, then non-prefixed properties)?