Skip to content

Commit

Permalink
Merge pull request #1166 from VladShcherbin/patch-1
Browse files Browse the repository at this point in the history
Update smacss sort order
  • Loading branch information
DanPurdy committed Jan 2, 2018
2 parents 508c135 + 9eb37ea commit 6a71e29
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 23 deletions.
110 changes: 89 additions & 21 deletions lib/config/property-sort-orders/smacss.yml
Expand Up @@ -5,15 +5,25 @@

order:

# Heading

- 'content'
- 'quotes'

# Box

- 'display'
- 'visibility'

- 'position'
- 'z-index'
- 'top'
- 'right'
- 'bottom'
- 'left'

- 'box-sizing'

- 'flex'
- 'flex-basis'
- 'flex-direction'
Expand All @@ -30,7 +40,6 @@ order:
- 'width'
- 'min-width'
- 'max-width'

- 'height'
- 'min-height'
- 'max-height'
Expand All @@ -50,6 +59,13 @@ order:
- 'float'
- 'clear'

- 'overflow'
- 'overflow-x'
- 'overflow-y'

- 'clip'
- 'zoom'

- 'columns'
- 'column-gap'
- 'column-fill'
Expand All @@ -58,16 +74,39 @@ order:
- 'column-count'
- 'column-width'

- 'table-layout'
- 'empty-cells'
- 'caption-side'
- 'border-spacing'
- 'border-collapse'
- 'list-style'
- 'list-style-position'
- 'list-style-type'
- 'list-style-image'

# Animation

- 'transform'
- 'transform-box'
- 'transform-origin'
- 'transform-style'

- 'backface-visibility'
- 'perspective'
- 'perspective-origin'

- 'transition'
- 'transition-delay'
- 'transition-duration'
- 'transition-property'
- 'transition-duration'
- 'transition-timing-function'
- 'transition-delay'

- 'animation'
- 'animation-name'
- 'animation-duration'
- 'animation-play-state'
- 'animation-timing-function'
- 'animation-delay'
- 'animation-iteration-count'
- 'animation-direction'

# Border

Expand Down Expand Up @@ -106,16 +145,24 @@ order:
- 'outline-style'
- 'outline-width'

- 'stroke-width'
- 'stroke-linecap'
- 'stroke-dasharray'
- 'stroke-dashoffset'
- 'stroke'

# Background

- 'opacity'

- 'background'
- 'background-attachment'
- 'background-clip'
- 'background-color'
- 'background-image'
- 'background-repeat'
- 'background-position'
- 'background-size'
- 'box-shadow'
- 'fill'

# Text

Expand All @@ -124,41 +171,62 @@ order:
- 'font'
- 'font-family'
- 'font-size'
- 'font-smoothing'
- 'font-size-adjust'
- 'font-stretch'
- 'font-effect'
- 'font-style'
- 'font-variant'
- 'font-weight'

- 'font-emphasize'
- 'font-emphasize-position'
- 'font-emphasize-style'

- 'letter-spacing'
- 'line-height'
- 'list-style'
- 'word-spacing'

- 'text-align'
- 'text-align-last'
- 'text-decoration'
- 'text-indent'
- 'text-justify'
- 'text-overflow'
- 'text-overflow-ellipsis'
- 'text-overflow-mode'
- 'text-rendering'
- 'text-outline'
- 'text-shadow'
- 'text-transform'
- 'text-wrap'
- 'word-wrap'
- 'word-break'

- 'text-emphasis'
- 'text-emphasis-color'
- 'text-emphasis-style'
- 'text-emphasis-position'

- 'vertical-align'
- 'white-space'
- 'word-spacing'
- 'hyphens'

- 'src'

# Other

- 'border-collapse'
- 'border-spacing'
- 'box-shadow'
- 'caption-side'
- 'content'
- 'tab-size'
- 'counter-reset'
- 'counter-increment'
- 'resize'
- 'cursor'
- 'empty-cells'
- 'opacity'
- 'overflow'
- 'quotes'
- 'pointer-events'
- 'speak'
- 'table-layout'
- 'vertical-align'
- 'visibility'
- 'z-index'
- 'user-select'
- 'nav-index'
- 'nav-up'
- 'nav-right'
- 'nav-down'
- 'nav-left'
4 changes: 2 additions & 2 deletions tests/rules/property-sort-order.js
Expand Up @@ -114,7 +114,7 @@ describe('property sort order - scss', function () {
}
]
}, function (data) {
lint.assert.equal(12, data.warningCount);
lint.assert.equal(14, data.warningCount);
done();
});
});
Expand Down Expand Up @@ -246,7 +246,7 @@ describe('property sort order - sass', function () {
}
]
}, function (data) {
lint.assert.equal(12, data.warningCount);
lint.assert.equal(14, data.warningCount);
done();
});
});
Expand Down

0 comments on commit 6a71e29

Please sign in to comment.