1.0.0 • Published 4 years ago
stylelint-config-semantic-order v1.0.0
Stylelint Config Semantic Order
Opinionated stylelint config order semantically grouping related css properties.
Installation
NPM
npm i -D stylelint-config-semantic-order
Yarn
yarn add -D stylelint-config-semantic-order
Usage
Add stylelint-config-semantic-order
your Stylelint config extends:
{
"extends": "stylelint-config-semantic-order"
}
Learn more about Stylelint.
Rationale
We aim for understandable, scannable and consistent code without changing the specificity. A logical ordering of rules and declarations allows you to “scan” quickly.
Properties
Properties with the largest impact (scope and/or importance) are put first. Using concepts from both Idiomatic CSS and ITCSS we setup our config by:
- Ordering on impact\ Rules with a larger scope or more effect on the layout and box size have more impact on the UI. Seeing rules with more impact first increases understanding.
- Grouping by relationship\
Grouping all properties related to
typography
andtheming
makes them easier to find.
Groups
Related property declarations are grouped in the following order:
- Specials
- Positioning
- Display
- Box
- Box model
- Table
- Typography
- Theming
- Accessibility & Interactions
- SVG presentation
- Transition & animation
Sources
The following sources have been used as inspiration for this config:
1.0.0
4 years ago
1.0.0-beta.1
4 years ago
1.0.0-alpha.2
4 years ago
0.1.0
4 years ago
1.0.0-alpha.1
4 years ago
0.0.0
4 years ago