hudochenkov / postcss-sorting

PostCSS plugin to keep rules and at-rules content in order.
MIT License
517 stars 31 forks source link

rule sorting #91

Closed akvadrako closed 4 years ago

akvadrako commented 4 years ago

The README says that this plugin will sort rules, but when I run the example, my rules are not sorted.

Is this by design? Is there a configuration option for sorting rules alphabetically?

hudochenkov commented 4 years ago

Provide more information, please. How do you use it? How did you configure.

You need to enable properties sorting, because by default this plugin doesn't do anything. Option you're looking for:


{
     'properties-order': 'alphabetical'
}
akvadrako commented 4 years ago

I don't have a setup anymore; I just wrote a script to do what I needed. But I'm not interested in properties - I want to sort the rules, like the README says.

hudochenkov commented 4 years ago

There were might have been a misunderstanding what plugin does. It sorts what is inside rules and at-rules. It doesn't change the order for rules, which are top level rule in the file.

Anyway, looks like you don't need this plugin anymore. I'm closing this issue.