Skip to content

Commit

Permalink
Support ordering of nested selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeroen Ransijn authored and Jeroen Ransijn committed Mar 22, 2015
1 parent 9165d87 commit dc3afb6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/options/sort-order.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,15 @@ module.exports = {
// If current node is not property-value pair or import or include,
// skip it and continue with the next node:
if (!propertyName) {
deleted.splice(deleted.length - sc0.length, deleted.length + 1);
continue;
if (nodeType === 'block') {
// Make an exception for blocks which may be positioned as well in the case
// you want a certain mixin under the selectors
propertyName = 'nested-selector';
} else {
deleted.splice(deleted.length - sc0.length, deleted.length + 1);
continue;
}

}

// Make an extended node and move it to a separate list for further
Expand Down

0 comments on commit dc3afb6

Please sign in to comment.