Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Commit

Permalink
🔧 Tweak the order of properties
Browse files Browse the repository at this point in the history
  • Loading branch information
jamieconnolly committed Jul 30, 2017
1 parent d64c73c commit 20bab6c
Showing 1 changed file with 37 additions and 29 deletions.
66 changes: 37 additions & 29 deletions rules/order.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ module.exports = {
'less-mixins',
],

// specify the alphabetical order of properties within declaration blocks.
'order/properties-alphabetical-order': null,

// specify the almost strict order of properties within declaration blocks
'order/properties-order': [
[
// Content
{
properties: [
'content',
'quotes',
],
},
// Position
Expand All @@ -44,6 +48,39 @@ module.exports = {
'visibility',
],
},
// Transform
{
properties: [
'backface-visibility',

'perspective',
'perspective-origin',

'transform',
'transform-origin',
'transform-style',

'transition',
'transition-delay',
'transition-duration',
'transition-property',
'transition-timing-function',
],
},
// Animation
{
properties: [
'animation',
'animation-delay',
'animation-direction',
'animation-duration',
'animation-fill-mode',
'animation-iteration-count',
'animation-name',
'animation-play-state',
'animation-timing-function',
],
},
// Layout
{
properties: [
Expand Down Expand Up @@ -256,35 +293,6 @@ module.exports = {
'word-wrap',
],
},
// Transform
{
properties: [
'transition',
'transition-delay',
'transition-duration',
'transition-property',
'transition-timing-function',

'transform',
'transform-origin',
'transform-style',

'perspective',
'perspective-origin',

'backface-visibility',

'animation',
'animation-delay',
'animation-direction',
'animation-duration',
'animation-fill-mode',
'animation-iteration-count',
'animation-name',
'animation-play-state',
'animation-timing-function',
],
},
], {
unspecified: 'bottomAlphabetical',
},
Expand Down

0 comments on commit 20bab6c

Please sign in to comment.