WordPress-Coding-Standards / stylelint-config-wordpress

WordPress shareable config for stylelint Note: Migrating to Gutenberg repo:

Home Page:https://github.com/WordPress/gutenberg/pull/22777

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add the stylelint-order plugin pack

tdmalone opened this issue · comments

The 'declaration-block-properties-order' rule appears to not be present in this config.

According to https://make.wordpress.org/core/handbook/best-practices/coding-standards/css/#property-ordering:

The baseline for ordering is:

Display
Positioning
Box model
Colors and Typography
Other

I could try to put this together in a list for declaration-block-properties-order if that would help? I'm just not sure if it has already been done and is just missing from the rules.

Thanks for creating the issue @tdmalone, it's been on my mind to add this, it would be great if you wanted to take a shot at adding this 😄

With that in mind, summing up any and all concerns raised in previous Trac tickets regarding property ordering and that of the current CSS Coding Standards would need considering.

Here's a couple of core tickets that have discussed property ordering in the past using csscomb:
https://core.trac.wordpress.org/ticket/20570
https://core.trac.wordpress.org/ticket/29792

The results of that became this gist: https://gist.github.com/GaryJones/c1fc8f0243406b9190c8 which in turn became cedaro/grunt-wp-css/blob/develop/tasks/config/default.json

I think using the above config from grunt-wp-css would be the best starting point

The declaration-block-properties-order rule was deprecated in stylelint 7.8.

The rule has been replaced by the stylelint-orderplugin pack instead.

Updating this issues title to reflect that.