index.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. module.exports = {
  2. plugins: ['stylelint-order'],
  3. rules: {
  4. 'order/properties-order': [
  5. {
  6. // Must be first.
  7. properties: ['all'],
  8. },
  9. {
  10. // Position.
  11. properties: [
  12. 'position',
  13. 'top',
  14. 'right',
  15. 'bottom',
  16. 'left',
  17. 'z-index',
  18. ],
  19. },
  20. {
  21. // Display mode.
  22. properties: ['box-sizing', 'display'],
  23. },
  24. {
  25. // Flexible boxes.
  26. properties: [
  27. 'flex',
  28. 'flex-basis',
  29. 'flex-direction',
  30. 'flex-flow',
  31. 'flex-grow',
  32. 'flex-shrink',
  33. 'flex-wrap',
  34. ],
  35. },
  36. {
  37. // Grid layout.
  38. properties: [
  39. 'grid',
  40. 'grid-area',
  41. 'grid-template',
  42. 'grid-template-areas',
  43. 'grid-template-rows',
  44. 'grid-template-columns',
  45. 'grid-row',
  46. 'grid-row-start',
  47. 'grid-row-end',
  48. 'grid-column',
  49. 'grid-column-start',
  50. 'grid-column-end',
  51. 'grid-auto-rows',
  52. 'grid-auto-columns',
  53. 'grid-auto-flow',
  54. 'grid-gap',
  55. 'grid-row-gap',
  56. 'grid-column-gap',
  57. ],
  58. },
  59. {
  60. // Gap.
  61. properties: ['gap', 'row-gap', 'column-gap'],
  62. },
  63. {
  64. // Align.
  65. properties: ['align-content', 'align-items', 'align-self'],
  66. },
  67. {
  68. // Justify.
  69. properties: [
  70. 'justify-content',
  71. 'justify-items',
  72. 'justify-self',
  73. ],
  74. },
  75. {
  76. // Order.
  77. properties: ['order'],
  78. },
  79. {
  80. // Box model.
  81. properties: [
  82. 'float',
  83. 'width',
  84. 'min-width',
  85. 'max-width',
  86. 'height',
  87. 'min-height',
  88. 'max-height',
  89. 'padding',
  90. 'padding-top',
  91. 'padding-right',
  92. 'padding-bottom',
  93. 'padding-left',
  94. 'margin',
  95. 'margin-top',
  96. 'margin-right',
  97. 'margin-bottom',
  98. 'margin-left',
  99. 'overflow',
  100. 'overflow-x',
  101. 'overflow-y',
  102. '-webkit-overflow-scrolling',
  103. '-ms-overflow-x',
  104. '-ms-overflow-y',
  105. '-ms-overflow-style',
  106. 'clip',
  107. 'clear',
  108. ],
  109. },
  110. {
  111. // Typography.
  112. properties: [
  113. 'font',
  114. 'font-family',
  115. 'font-size',
  116. 'font-style',
  117. 'font-weight',
  118. 'font-variant',
  119. 'font-size-adjust',
  120. 'font-stretch',
  121. 'font-effect',
  122. 'font-emphasize',
  123. 'font-emphasize-position',
  124. 'font-emphasize-style',
  125. '-webkit-font-smoothing',
  126. '-moz-osx-font-smoothing',
  127. 'font-smooth',
  128. 'hyphens',
  129. 'line-height',
  130. 'color',
  131. 'text-align',
  132. 'text-align-last',
  133. 'text-emphasis',
  134. 'text-emphasis-color',
  135. 'text-emphasis-style',
  136. 'text-emphasis-position',
  137. 'text-decoration',
  138. 'text-indent',
  139. 'text-justify',
  140. 'text-outline',
  141. '-ms-text-overflow',
  142. 'text-overflow',
  143. 'text-overflow-ellipsis',
  144. 'text-overflow-mode',
  145. 'text-shadow',
  146. 'text-transform',
  147. 'text-wrap',
  148. '-webkit-text-size-adjust',
  149. '-ms-text-size-adjust',
  150. 'letter-spacing',
  151. 'word-break',
  152. 'word-spacing',
  153. 'word-wrap', // Legacy name for `overflow-wrap`
  154. 'overflow-wrap',
  155. 'tab-size',
  156. 'white-space',
  157. 'vertical-align',
  158. 'list-style',
  159. 'list-style-position',
  160. 'list-style-type',
  161. 'list-style-image',
  162. ],
  163. },
  164. {
  165. // Accessibility & Interactions.
  166. properties: [
  167. 'pointer-events',
  168. '-ms-touch-action',
  169. 'touch-action',
  170. 'cursor',
  171. 'visibility',
  172. 'zoom',
  173. 'table-layout',
  174. 'empty-cells',
  175. 'caption-side',
  176. 'border-spacing',
  177. 'border-collapse',
  178. 'content',
  179. 'quotes',
  180. 'counter-reset',
  181. 'counter-increment',
  182. 'resize',
  183. 'user-select',
  184. 'nav-index',
  185. 'nav-up',
  186. 'nav-right',
  187. 'nav-down',
  188. 'nav-left',
  189. ],
  190. },
  191. {
  192. // Background & Borders.
  193. properties: [
  194. 'background',
  195. 'background-color',
  196. 'background-image',
  197. "-ms-filter:\\'progid:DXImageTransform.Microsoft.gradient",
  198. 'filter:progid:DXImageTransform.Microsoft.gradient',
  199. 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader',
  200. 'filter',
  201. 'background-repeat',
  202. 'background-attachment',
  203. 'background-position',
  204. 'background-position-x',
  205. 'background-position-y',
  206. 'background-clip',
  207. 'background-origin',
  208. 'background-size',
  209. 'background-blend-mode',
  210. 'isolation',
  211. 'border',
  212. 'border-color',
  213. 'border-style',
  214. 'border-width',
  215. 'border-top',
  216. 'border-top-color',
  217. 'border-top-style',
  218. 'border-top-width',
  219. 'border-right',
  220. 'border-right-color',
  221. 'border-right-style',
  222. 'border-right-width',
  223. 'border-bottom',
  224. 'border-bottom-color',
  225. 'border-bottom-style',
  226. 'border-bottom-width',
  227. 'border-left',
  228. 'border-left-color',
  229. 'border-left-style',
  230. 'border-left-width',
  231. 'border-radius',
  232. 'border-top-left-radius',
  233. 'border-top-right-radius',
  234. 'border-bottom-right-radius',
  235. 'border-bottom-left-radius',
  236. 'border-image',
  237. 'border-image-source',
  238. 'border-image-slice',
  239. 'border-image-width',
  240. 'border-image-outset',
  241. 'border-image-repeat',
  242. 'outline',
  243. 'outline-width',
  244. 'outline-style',
  245. 'outline-color',
  246. 'outline-offset',
  247. 'box-shadow',
  248. 'mix-blend-mode',
  249. 'filter:progid:DXImageTransform.Microsoft.Alpha(Opacity',
  250. "-ms-filter:\\'progid:DXImageTransform.Microsoft.Alpha",
  251. 'opacity',
  252. '-ms-interpolation-mode',
  253. ],
  254. },
  255. {
  256. // SVG Presentation Attributes.
  257. properties: [
  258. 'alignment-baseline',
  259. 'baseline-shift',
  260. 'dominant-baseline',
  261. 'text-anchor',
  262. 'word-spacing',
  263. 'writing-mode',
  264. 'fill',
  265. 'fill-opacity',
  266. 'fill-rule',
  267. 'stroke',
  268. 'stroke-dasharray',
  269. 'stroke-dashoffset',
  270. 'stroke-linecap',
  271. 'stroke-linejoin',
  272. 'stroke-miterlimit',
  273. 'stroke-opacity',
  274. 'stroke-width',
  275. 'color-interpolation',
  276. 'color-interpolation-filters',
  277. 'color-profile',
  278. 'color-rendering',
  279. 'flood-color',
  280. 'flood-opacity',
  281. 'image-rendering',
  282. 'lighting-color',
  283. 'marker-start',
  284. 'marker-mid',
  285. 'marker-end',
  286. 'mask',
  287. 'shape-rendering',
  288. 'stop-color',
  289. 'stop-opacity',
  290. ],
  291. },
  292. {
  293. // Transitions & Animation.
  294. properties: [
  295. 'transition',
  296. 'transition-delay',
  297. 'transition-timing-function',
  298. 'transition-duration',
  299. 'transition-property',
  300. 'transform',
  301. 'transform-origin',
  302. 'animation',
  303. 'animation-name',
  304. 'animation-duration',
  305. 'animation-play-state',
  306. 'animation-timing-function',
  307. 'animation-delay',
  308. 'animation-iteration-count',
  309. 'animation-direction',
  310. ],
  311. },
  312. ],
  313. },
  314. }