├── .gitattributes ├── .editorconfig ├── README.md ├── .gitignore ├── package.json ├── LICENSE └── index.js /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | end_of_line = lf 7 | indent_size = 2 8 | indent_style = space 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # css-property-sort-order-smacss 2 | 3 | [![NPM version](https://img.shields.io/npm/v/css-property-sort-order-smacss.svg)](https://www.npmjs.org/package/css-property-sort-order-smacss) 4 | [![NPM Downloads](https://img.shields.io/npm/dm/css-property-sort-order-smacss.svg)](https://www.npmjs.org/package/css-property-sort-order-smacss) 5 | 6 | CSS Property Sort Order based on the [SMACSS](https://smacss.com/book/formatting#grouping) methodology. 7 | 8 | ## Contributing 9 | This repo is by no means 100% accurate or conclusive - so if you spot any issues, please file free to file an Issue or submit a Pull Request. 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # nyc test coverage 18 | .nyc_output 19 | 20 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 21 | .grunt 22 | 23 | # node-waf configuration 24 | .lock-wscript 25 | 26 | # Compiled binary addons (http://nodejs.org/api/addons.html) 27 | build/Release 28 | 29 | # Dependency directories 30 | node_modules 31 | jspm_packages 32 | 33 | # Optional npm cache directory 34 | .npm 35 | 36 | # Optional REPL history 37 | .node_repl_history 38 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "css-property-sort-order-smacss", 3 | "version": "2.2.0", 4 | "description": "CSS Property Sort Order based on the SMACSS methodology", 5 | "main": "index.js", 6 | "files": [ 7 | "index.js" 8 | ], 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/cahamilton/css-property-sort-order-smacss.git" 12 | }, 13 | "keywords": [ 14 | "CSS", 15 | "SMACSS", 16 | "Scalable and Modular Architecture for CSS", 17 | "CSS Property Sort Order" 18 | ], 19 | "author": "Carl Hamilton ", 20 | "license": "MIT", 21 | "bugs": { 22 | "url": "https://github.com/cahamilton/css-property-sort-order-smacss/issues" 23 | }, 24 | "homepage": "https://github.com/cahamilton/css-property-sort-order-smacss#readme" 25 | } 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Carl Hamilton 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "heading": [ 3 | "content", 4 | "quotes" 5 | ], 6 | "box": [ 7 | [ 8 | "display", 9 | "visibility" 10 | ], 11 | [ 12 | "position", 13 | "z-index", 14 | "top", 15 | "right", 16 | "bottom", 17 | "left" 18 | ], 19 | [ 20 | "box-sizing" 21 | ], 22 | [ 23 | "grid", 24 | "grid-after", 25 | "grid-area", 26 | "grid-auto-columns", 27 | "grid-auto-flow", 28 | "grid-auto-rows", 29 | "grid-before", 30 | "grid-column", 31 | "grid-column-end", 32 | "grid-column-gap", 33 | "grid-column-start", 34 | "grid-columns", 35 | "grid-end", 36 | "grid-gap", 37 | "grid-row", 38 | "grid-row-end", 39 | "grid-row-gap", 40 | "grid-row-start", 41 | "grid-rows", 42 | "grid-start", 43 | "grid-template", 44 | "grid-template-areas", 45 | "grid-template-columns", 46 | "grid-template-rows" 47 | ], 48 | [ 49 | "flex", 50 | "flex-basis", 51 | "flex-direction", 52 | "flex-flow", 53 | "flex-grow", 54 | "flex-shrink", 55 | "flex-wrap", 56 | "align-content", 57 | "align-items", 58 | "align-self", 59 | "justify-content", 60 | "order" 61 | ], 62 | [ 63 | "width", 64 | "min-width", 65 | "max-width" 66 | ], 67 | [ 68 | "height", 69 | "min-height", 70 | "max-height" 71 | ], 72 | [ 73 | "block-size", 74 | "min-block-size", 75 | "max-block-size" 76 | ], 77 | [ 78 | "inline-size", 79 | "min-inline-size", 80 | "max-inline-size" 81 | ], 82 | [ 83 | "margin", 84 | "margin-top", 85 | "margin-right", 86 | "margin-bottom", 87 | "margin-left" 88 | ], 89 | [ 90 | "margin-block", 91 | "margin-block-start", 92 | "margin-block-end" 93 | ], 94 | [ 95 | "margin-inline", 96 | "margin-inline-start", 97 | "margin-inline-end" 98 | ], 99 | [ 100 | "padding", 101 | "padding-top", 102 | "padding-right", 103 | "padding-bottom", 104 | "padding-left" 105 | ], 106 | [ 107 | "padding-block", 108 | "padding-block-start", 109 | "padding-block-end" 110 | ], 111 | [ 112 | "padding-inline", 113 | "padding-inline-start", 114 | "padding-inline-end" 115 | ], 116 | [ 117 | "float", 118 | "clear" 119 | ], 120 | [ 121 | "overflow", 122 | "overflow-x", 123 | "overflow-y" 124 | ], 125 | [ 126 | "clip", 127 | "zoom" 128 | ], 129 | [ 130 | "columns", 131 | "column-gap", 132 | "column-fill", 133 | "column-rule", 134 | "column-span", 135 | "column-count", 136 | "column-width" 137 | ], 138 | [ 139 | "table-layout", 140 | "empty-cells", 141 | "caption-side", 142 | "border-spacing", 143 | "border-collapse", 144 | "list-style", 145 | "list-style-position", 146 | "list-style-type", 147 | "list-style-image" 148 | ] 149 | ], 150 | "animation": [ 151 | [ 152 | "transform", 153 | "transform-box", 154 | "transform-origin", 155 | "transform-style", 156 | "backface-visibility", 157 | "perspective", 158 | "perspective-origin" 159 | ], 160 | [ 161 | "transition", 162 | "transition-property", 163 | "transition-duration", 164 | "transition-timing-function", 165 | "transition-delay" 166 | ], 167 | [ 168 | "animation", 169 | "animation-name", 170 | "animation-duration", 171 | "animation-play-state", 172 | "animation-timing-function", 173 | "animation-delay", 174 | "animation-iteration-count", 175 | "animation-direction" 176 | ] 177 | ], 178 | "border": [ 179 | [ 180 | "border", 181 | "border-top", 182 | "border-right", 183 | "border-bottom", 184 | "border-left", 185 | "border-width", 186 | "border-top-width", 187 | "border-right-width", 188 | "border-bottom-width", 189 | "border-left-width" 190 | ], 191 | [ 192 | "border-style", 193 | "border-top-style", 194 | "border-right-style", 195 | "border-bottom-style", 196 | "border-left-style" 197 | ], 198 | [ 199 | "border-radius", 200 | "border-top-left-radius", 201 | "border-top-right-radius", 202 | "border-bottom-right-radius", 203 | "border-bottom-left-radius" 204 | ], 205 | [ 206 | "border-color", 207 | "border-top-color", 208 | "border-right-color", 209 | "border-bottom-color", 210 | "border-left-color" 211 | ], 212 | [ 213 | "outline", 214 | "outline-color", 215 | "outline-offset", 216 | "outline-style", 217 | "outline-width" 218 | ], 219 | [ 220 | "stroke-width", 221 | "stroke-linecap", 222 | "stroke-dasharray", 223 | "stroke-dashoffset", 224 | "stroke" 225 | ] 226 | ], 227 | "background": [ 228 | [ 229 | "opacity" 230 | ], 231 | [ 232 | "background", 233 | "background-attachment", 234 | "background-clip", 235 | "background-color", 236 | "background-image", 237 | "background-repeat", 238 | "background-position", 239 | "background-size", 240 | "box-shadow", 241 | "fill" 242 | ] 243 | ], 244 | "text": [ 245 | [ 246 | "color" 247 | ], 248 | [ 249 | "font", 250 | "font-family", 251 | "font-size", 252 | "font-size-adjust", 253 | "font-smoothing", 254 | "font-stretch", 255 | "font-style", 256 | "font-variant", 257 | "font-weight" 258 | ], 259 | [ 260 | "font-emphasize", 261 | "font-emphasize-position", 262 | "font-emphasize-style" 263 | ], 264 | [ 265 | "letter-spacing", 266 | "line-height", 267 | "list-style" 268 | ], 269 | [ 270 | "text-align", 271 | "text-align-last", 272 | "text-decoration", 273 | "text-decoration-color", 274 | "text-decoration-line", 275 | "text-decoration-style", 276 | "text-indent", 277 | "text-justify", 278 | "text-overflow", 279 | "text-overflow-ellipsis", 280 | "text-overflow-mode", 281 | "text-rendering", 282 | "text-outline", 283 | "text-shadow", 284 | "text-transform", 285 | "text-wrap", 286 | "word-wrap", 287 | "word-break" 288 | ], 289 | [ 290 | "text-emphasis", 291 | "text-emphasis-color", 292 | "text-emphasis-style", 293 | "text-emphasis-position" 294 | ], 295 | [ 296 | "vertical-align", 297 | "white-space", 298 | "word-spacing", 299 | "hyphens" 300 | ], 301 | [ 302 | "src" 303 | ] 304 | ], 305 | "other": [ 306 | [ 307 | "tab-size", 308 | "counter-reset", 309 | "counter-increment", 310 | "resize", 311 | "cursor", 312 | "pointer-events", 313 | "speak", 314 | "user-select", 315 | "nav-index", 316 | "nav-up", 317 | "nav-right", 318 | "nav-down", 319 | "nav-left" 320 | ] 321 | ] 322 | }; 323 | --------------------------------------------------------------------------------