Skip to content

Commit

Permalink
Allow placing block at-rules anywhere for better flexibility
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkudrna committed Aug 22, 2024
1 parent f424348 commit a2e40c2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ The `order` config enforces a consistent order of content in your declaration bl
3. Sass `@extend`,
4. single-line Sass `@include`,
5. declarations,
6. nested rules,
7. any other at-rules.
6. nested rules.

For better flexibility, block at-rules (like `@media`, `@supports`, and also Sass `@if`, `@each`, etc.) can be placed
anywhere in the declaration block.

Furthermore, properties in the declarations must be ordered by following categories:

Expand Down
4 changes: 0 additions & 4 deletions order.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ module.exports = {
},
'declarations',
'rules',
{
hasBlock: true,
type: 'at-rule',
},
],
'order/properties-order': [

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/visionappscz/stylelint-config.git"
"url": "git+https://github.com/visionappscz/stylelint-config.git"
},
"bugs": {
"url": "https://github.com/visionappscz/stylelint-config/issues"
Expand Down

0 comments on commit a2e40c2

Please sign in to comment.