Skip to content

Commit a2f5e07

Browse files
Change property declaration order
1 parent 67c8242 commit a2f5e07

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -210,31 +210,30 @@ Use `0` instead of `none` to specify that a style has no border.
210210

211211
### Ordering of property declarations
212212

213-
1. Property declarations
214-
215-
List all standard property declarations, anything that isn't an `@include` or a nested selector.
213+
1. `@include` declarations
216214

215+
Grouping `@include`s at the start makes discerning the output easier and allows overrides to be applied.
217216
```scss
218217
.btn-green {
219218
background: green;
220219
font-weight: bold;
220+
@include transition(background 0.5s ease);
221221
// ...
222222
}
223223
```
224224

225-
2. `@include` declarations
225+
2. Property declarations
226226

227-
Grouping `@include`s at the end makes it easier to read the entire selector.
227+
List all standard property declarations, anything that isn't an `@include` or a nested selector.
228228

229229
```scss
230230
.btn-green {
231231
background: green;
232232
font-weight: bold;
233-
@include transition(background 0.5s ease);
234233
// ...
235234
}
236235
```
237-
236+
238237
3. Nested selectors
239238

240239
Nested selectors, _if necessary_, go last, and nothing goes after them. Add whitespace between your rule declarations and nested selectors, as well as between adjacent nested selectors. Apply the same guidelines as above to your nested selectors.

0 commit comments

Comments
 (0)