Skip to content

Instantly share code, notes, and snippets.

@GaryJones GaryJones/.csscomb.json
Last active Nov 2, 2018

Embed
What would you like to do?
[Replaced] CSSComb file for WP core.
See https://github.com/cedaro/grunt-wp-css/blob/develop/tasks/config/default.json
@GaryJones

This comment has been minimized.

Copy link
Owner Author

commented May 13, 2014

Configuration Options are detailed at https://github.com/csscomb/csscomb.js/blob/master/doc/options.md

Current WP CSS coding standards for property ordering are outlined at http://make.wordpress.org/core/handbook/coding-standards/css/#property-ordering . These are too generic, so using an automated tool (via grunt, editor plugin, website (once re-done)) with unambiguous prescriptive list of individual properties is better.

exclude and verbose are optional and just here to show they exist. Main focus here is the sort order. Properties are broken up into Display, Positioning, Box Model, Colors and Typography, and Other as per CS. All given in one array, so no clear linespaces will appear in the sorted output. $variable and $include cover sorting with both Sass and LESS variables and mixins / extend, so suitable for all projects outside of core too.

https://core.trac.wordpress.org/ticket/20570#comment:32
https://core.trac.wordpress.org/ticket/22097

Feedback welcome.

@saas786

This comment has been minimized.

Copy link

commented Jan 19, 2015

Thanks @GaryJones

Using it with my upcoming projects. Much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.