stylelint-order
Version:
A collection of order related linting rules for Stylelint.
325 lines (319 loc) • 8.93 kB
JavaScript
// See https://github.com/stylelint/stylelint/blob/10.1.0/lib/reference/shorthandData.js
// More properties were added in addition to the file above
export const shorthandData = {
margin: [
'margin-top',
'margin-bottom',
'margin-left',
'margin-right',
'margin-block',
'margin-inline',
],
'margin-block': ['margin-block-start', 'margin-block-end'],
'margin-block-start': ['margin-top', 'margin-bottom', 'margin-left', 'margin-right'],
'margin-block-end': ['margin-top', 'margin-bottom', 'margin-left', 'margin-right'],
'margin-inline': ['margin-inline-start', 'margin-inline-end'],
'margin-inline-start': ['margin-top', 'margin-bottom', 'margin-left', 'margin-right'],
'margin-inline-end': ['margin-top', 'margin-bottom', 'margin-left', 'margin-right'],
padding: [
'padding-top',
'padding-bottom',
'padding-left',
'padding-right',
'padding-block',
'padding-block-start',
'padding-block-end',
'padding-inline',
'padding-inline-start',
'padding-inline-end',
],
'padding-block': [
'padding-block-start',
'padding-block-end',
'padding-top',
'padding-bottom',
'padding-left',
'padding-right',
],
'padding-block-start': ['padding-top', 'padding-bottom', 'padding-left', 'padding-right'],
'padding-block-end': ['padding-top', 'padding-bottom', 'padding-left', 'padding-right'],
'padding-inline': [
'padding-inline-start',
'padding-inline-end',
'padding-top',
'padding-bottom',
'padding-left',
'padding-right',
],
'padding-inline-start': ['padding-top', 'padding-bottom', 'padding-left', 'padding-right'],
'padding-inline-end': ['padding-top', 'padding-bottom', 'padding-left', 'padding-right'],
background: [
'background-image',
'background-size',
'background-position',
'background-repeat',
'background-origin',
'background-clip',
'background-attachment',
'background-color',
],
font: [
'font-style',
'font-variant',
'font-weight',
'font-stretch',
'font-size',
'font-family',
'line-height',
],
border: [
'border-inline',
'border-block',
'border-top',
'border-bottom',
'border-left',
'border-right',
'border-width',
'border-style',
'border-color',
],
'border-inline': [
'border-inline-start',
'border-inline-end',
'border-inline-width',
'border-inline-style',
'border-inline-color',
],
'border-inline-width': ['border-inline-start-width', 'border-inline-end-width'],
'border-inline-style': ['border-inline-start-style', 'border-inline-end-style'],
'border-inline-color': ['border-inline-start-color', 'border-inline-end-color'],
'border-inline-start': [
'border-inline-start-width',
'border-inline-start-style',
'border-inline-start-color',
'border-top',
'border-bottom',
'border-left',
'border-right',
],
'border-inline-start-width': [
'border-top-width',
'border-bottom-width',
'border-left-width',
'border-right-width',
],
'border-inline-start-style': [
'border-top-style',
'border-bottom-style',
'border-left-style',
'border-right-style',
],
'border-inline-start-color': [
'border-top-color',
'border-bottom-color',
'border-left-color',
'border-right-color',
],
'border-inline-end': [
'border-inline-end-width',
'border-inline-end-style',
'border-inline-end-color',
'border-top',
'border-bottom',
'border-left',
'border-right',
],
'border-inline-end-width': [
'border-top-width',
'border-bottom-width',
'border-left-width',
'border-right-width',
],
'border-inline-end-style': [
'border-top-style',
'border-bottom-style',
'border-left-style',
'border-right-style',
],
'border-inline-end-color': [
'border-top-color',
'border-bottom-color',
'border-left-color',
'border-right-color',
],
'border-block': [
'border-block-start',
'border-block-end',
'border-block-width',
'border-block-style',
'border-block-color',
],
'border-block-width': ['border-block-start-width', 'border-block-end-width'],
'border-block-style': ['border-block-start-style', 'border-block-end-style'],
'border-block-color': ['border-block-start-color', 'border-block-end-color'],
'border-block-start': [
'border-block-start-width',
'border-block-start-style',
'border-block-start-color',
'border-top',
'border-bottom',
'border-left',
'border-right',
],
'border-block-start-width': [
'border-top-width',
'border-bottom-width',
'border-left-width',
'border-right-width',
],
'border-block-start-style': [
'border-top-style',
'border-bottom-style',
'border-left-style',
'border-right-style',
],
'border-block-start-color': [
'border-top-color',
'border-bottom-color',
'border-left-color',
'border-right-color',
],
'border-block-end': [
'border-block-end-width',
'border-block-end-style',
'border-block-end-color',
'border-top',
'border-bottom',
'border-left',
'border-right',
],
'border-block-end-width': [
'border-top-width',
'border-bottom-width',
'border-left-width',
'border-right-width',
],
'border-block-end-style': [
'border-top-style',
'border-bottom-style',
'border-left-style',
'border-right-style',
],
'border-block-end-color': [
'border-top-color',
'border-bottom-color',
'border-left-color',
'border-right-color',
],
'border-top': ['border-top-width', 'border-top-style', 'border-top-color'],
'border-bottom': ['border-bottom-width', 'border-bottom-style', 'border-bottom-color'],
'border-left': ['border-left-width', 'border-left-style', 'border-left-color'],
'border-right': ['border-right-width', 'border-right-style', 'border-right-color'],
'border-width': [
'border-top-width',
'border-bottom-width',
'border-left-width',
'border-right-width',
],
'border-style': [
'border-top-style',
'border-bottom-style',
'border-left-style',
'border-right-style',
],
'border-color': [
'border-top-color',
'border-bottom-color',
'border-left-color',
'border-right-color',
],
'border-image': [
'border-image-source',
'border-image-slice',
'border-image-width',
'border-image-outset',
'border-image-repeat',
],
'border-radius': [
'border-top-right-radius',
'border-top-left-radius',
'border-bottom-right-radius',
'border-bottom-left-radius',
],
'list-style': ['list-style-type', 'list-style-position', 'list-style-image'],
transition: [
'transition-delay',
'transition-duration',
'transition-property',
'transition-timing-function',
],
animation: [
'animation-name',
'animation-duration',
'animation-timing-function',
'animation-delay',
'animation-iteration-count',
'animation-direction',
'animation-fill-mode',
'animation-play-state',
],
'column-rule': ['column-rule-width', 'column-rule-style', 'column-rule-color'],
columns: ['column-width', 'column-count'],
flex: ['flex-grow', 'flex-shrink', 'flex-basis'],
'flex-flow': ['flex-direction', 'flex-wrap'],
grid: [
'grid-template-rows',
'grid-template-columns',
'grid-template-areas',
'grid-auto-rows',
'grid-auto-columns',
'grid-auto-flow',
'grid-column-gap',
'grid-row-gap',
],
'grid-area': ['grid-row-start', 'grid-column-start', 'grid-row-end', 'grid-column-end'],
'grid-column': ['grid-column-start', 'grid-column-end'],
'grid-gap': ['grid-row-gap', 'grid-column-gap'],
'grid-row': ['grid-row-start', 'grid-row-end'],
'grid-template': ['grid-template-columns', 'grid-template-rows', 'grid-template-areas'],
offset: ['offset-anchor', 'offset-distance', 'offset-path', 'offset-position', 'offset-rotate'],
outline: ['outline-color', 'outline-style', 'outline-width'],
overflow: ['overflow-block', 'overflow-inline', 'overflow-x', 'overflow-y'],
'overflow-block': ['overflow-x', 'overflow-y'],
'overflow-inline': ['overflow-x', 'overflow-y'],
'overscroll-behavior': [
'overscroll-behavior-x',
'overscroll-behavior-y',
'overscroll-behavior-block',
'overscroll-behavior-inline',
],
'overscroll-behavior-block': ['overscroll-behavior-x', 'overscroll-behavior-y'],
'overscroll-behavior-inline': ['overscroll-behavior-x', 'overscroll-behavior-y'],
'text-decoration': ['text-decoration-color', 'text-decoration-style', 'text-decoration-line'],
'text-emphasis': ['text-emphasis-style', 'text-emphasis-color'],
mask: [
'mask-image',
'mask-mode',
'mask-position',
'mask-size',
'mask-repeat',
'mask-origin',
'mask-clip',
'mask-composite',
],
'mask-border': [
'mask-border-mode',
'mask-border-outset',
'mask-border-repeat',
'mask-border-slice',
'mask-border-source',
'mask-border-width',
],
inset: ['top', 'right', 'bottom', 'left', 'inset-block', 'inset-inline'],
'inset-block': ['inset-block-end', 'inset-block-start'],
'inset-inline': ['inset-inline-end', 'inset-inline-start'],
'inset-block-start': ['top', 'bottom', 'left', 'right'],
'inset-block-end': ['top', 'bottom', 'left', 'right'],
'inset-inline-start': ['top', 'bottom', 'left', 'right'],
'inset-inline-end': ['top', 'bottom', 'left', 'right'],
};