csssortingpropertiescsstidy

Configure CSSTidy selector sorting


How do I configure the order that CSSTidy uses to sort the properties?

I would like to use the box model sorting for CSS selectors (outside to inside), but I tried setting "sort_properties": "true" but the sorting doesn't seem to take place. The result is:

#background {
 position:absolute;
 top:0;
 width:100%;
 height:100%
}
#background img {
 width:100%;
 height:100%;
 top:10px;
 min-width:1100px;
 padding-top:95px;
 position:absolute
}

jsfiddle


Solution

  • The sorting does seem to work for me but it's not a popular order. I.e. height gets put before width.

    Instead of trying to fix/configure CSSTidy I'd recommend CSScomb for sorting.