Skip to content

Instantly share code, notes, and snippets.

@iagodahlem
Last active September 28, 2016 14:16
Show Gist options
  • Save iagodahlem/d265cea847643f030c6812876908f885 to your computer and use it in GitHub Desktop.
Save iagodahlem/d265cea847643f030c6812876908f885 to your computer and use it in GitHub Desktop.
My CSS order declaration rules for stylelint.
{
'declaration-block-properties-order': [
{
properties: [
'position',
'z-index',
'top',
'right',
'bottom',
'left',
],
},
{
properties: [
'display',
'visibility',
'float',
'clear',
'overflow',
'overflow-x',
'overflow-y',
'clip',
'zoom',
'flex-direction',
'flex-order',
'flex-pack',
'flex-align',
],
},
{
properties: [
'box-sizing',
'width',
'min-width',
'max-width',
'height',
'min-height',
'max-height',
'margin',
'margin-top',
'margin-right',
'margin-bottom',
'margin-left',
'padding',
'padding-top',
'padding-right',
'padding-bottom',
'padding-left',
],
},
{
properties: [
'opacity',
'color',
'border',
'border-collapse',
'border-width',
'border-style',
'border-color',
'border-top',
'border-top-width',
'border-top-style',
'border-top-color',
'border-right',
'border-right-width',
'border-right-style',
'border-right-color',
'border-bottom',
'border-bottom-width',
'border-bottom-style',
'border-bottom-color',
'border-left',
'border-left-width',
'border-left-style',
'border-left-color',
'border-radius',
'border-top-left-radius',
'border-top-right-radius',
'border-bottom-right-radius',
'border-bottom-left-radius',
'border-image',
'border-image-source',
'border-image-slice',
'border-image-width',
'border-image-outset',
'border-image-repeat',
'outline',
'outline-width',
'outline-style',
'outline-color',
'outline-offset',
'background',
'background-color',
'background-image',
'background-repeat',
'background-attachment',
'background-position',
'background-position-x',
'background-position-y',
'background-clip',
'background-origin',
'background-size',
'box-decoration-break',
'box-shadow',
'text-shadow',
],
},
{
properties: [
'content',
'cursor',
'transition',
'transition-delay',
'transition-timing-function',
'transition-duration',
'transition-property',
'transform',
'transform-origin',
'animation',
'animation-name',
'animation-duration',
'animation-play-state',
'animation-timing-function',
'animation-delay',
'animation-iteration-count',
'animation-iteration-count',
'animation-direction',
'text-align',
'vertical-align',
'white-space',
'text-decoration',
'text-emphasis',
'text-emphasis-color',
'text-emphasis-style',
'text-emphasis-position',
'text-indent',
'text-justify',
'text-transform',
'letter-spacing',
'word-spacing',
'text-outline',
'text-transform',
'text-wrap',
'text-overflow',
'text-overflow-ellipsis',
'text-overflow-mode',
'word-wrap',
'word-break',
],
},
{
properties: [
'transition',
'transition-delay',
'transition-timing-function',
'transition-duration',
'transition-property',
'transform',
'transform-origin',
'animation',
'animation-name',
'animation-duration',
'animation-play-state',
'animation-timing-function',
'animation-delay',
'animation-iteration-count',
'animation-iteration-count',
'animation-direction',
],
},
{
properties: [
'font',
'font-family',
'font-size',
'font-weight',
'font-style',
'font-variant',
'font-size-adjust',
'font-stretch',
'font-effect',
'font-emphasize',
'font-emphasize-position',
'font-emphasize-style',
'font-smooth',
'line-height',
],
},
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment