File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -8,13 +8,13 @@ const calcRulePatternPriority = require('./calcRulePatternPriority');
8
8
module . exports = function getOrderData ( expectedOrder , node ) {
9
9
let nodeType ;
10
10
11
- if ( node . type === 'decl' ) {
11
+ if ( isAtVariable ( node ) ) {
12
+ nodeType = 'at-variables' ;
13
+ } else if ( node . type === 'decl' ) {
12
14
if ( isCustomProperty ( node . prop ) ) {
13
15
nodeType = 'custom-properties' ;
14
16
} else if ( isDollarVariable ( node . prop ) ) {
15
17
nodeType = 'dollar-variables' ;
16
- } else if ( isAtVariable ( node . prop ) ) {
17
- nodeType = 'at-variables' ;
18
18
} else if ( isStandardSyntaxProperty ( node . prop ) ) {
19
19
nodeType = 'declarations' ;
20
20
}
Original file line number Diff line number Diff line change 1
1
/**
2
- * Check whether a property is a @-variable
3
- *
4
- * @param {string } property
5
- * @return {boolean } If `true`, property is a @-variable
2
+ * Check whether a property is a @-variable (Less)
6
3
*/
7
- 'use strict' ;
8
4
9
- module . exports = function isAtVariable ( property ) {
10
- return property [ 0 ] === '@' ;
5
+ module . exports = function isAtVariable ( node ) {
6
+ return node . type === 'atrule' && node . variable ;
11
7
} ;
You can’t perform that action at this time.
0 commit comments