Skip to content

Rules for CSSComb

Ski-lleR edited this page Jun 27, 2016 · 5 revisions

Download the file

I've set the option for css look like this after parsing (feel free to modify like you want) :
.example {
[SPACE][SPACE]font: .1rem 'Optima';
}
[BLANK LINE]
.example {
[SPACE][SPACE]font: .1rem 'Optima';
}

Property are ordered like this :

  1. Position
  2. Display
  3. Table, list & counter-style thing
  4. Sizing (including margin, padding etc...)
  5. Flex
  6. Background
  7. Border
  8. Radius
  9. Common typography
  10. Uncommon typography
  11. Box shadow
  12. Columns
  13. Grid
  14. Input move (cursor, touch/pointer event)
  15. Imaging (filter, orientation, transform etc...)
  16. Animation
  17. Transition
  18. Strange property 1
  19. Strange property 2

I know there is a lot of property with all vendor specific, but the reason is because i use autoprefixer before running CSSComb, and i support IE >= 8 | Android >= 2.1, so that prevent some property to finish unordered at bottom.

If you have idea to improve the order, use the Issues tracker.

Clone this wiki locally