1 |
|
2 |
|
3 |
|
4 | export function isStandardSyntaxDeclaration (decl /*: Object */) /*: boolean */ {
|
5 | const prop = decl.prop
|
6 | const parent = decl.parent
|
7 |
|
8 |
|
9 |
|
10 | if (parent.type === 'root') {
|
11 | return false
|
12 | }
|
13 |
|
14 |
|
15 | if (prop[0] === '$') {
|
16 | return false
|
17 | }
|
18 |
|
19 |
|
20 | if (prop[0] === '@' && prop[1] !== '{') {
|
21 | return false
|
22 | }
|
23 |
|
24 |
|
25 | if (
|
26 | parent.selector &&
|
27 | parent.selector[parent.selector.length - 1] === ':' &&
|
28 | parent.selector.substring(0, 2) !== '--'
|
29 | ) {
|
30 | return false
|
31 | }
|
32 |
|
33 | return true
|
34 | }
|