1 | ;
|
2 |
|
3 | const hasInterpolation = require('../utils/hasInterpolation');
|
4 | const isScssVariable = require('./isScssVariable');
|
5 |
|
6 | /**
|
7 | * Check whether a property is standard
|
8 | *
|
9 | * @param {string} property
|
10 | * @returns {boolean}
|
11 | */
|
12 | module.exports = function (property) {
|
13 | // SCSS var
|
14 | if (isScssVariable(property)) {
|
15 | return false;
|
16 | }
|
17 |
|
18 | // Less var (e.g. @var: x)
|
19 | if (property.startsWith('@')) {
|
20 | return false;
|
21 | }
|
22 |
|
23 | // Less append property value with space (e.g. transform+_: scale(2))
|
24 | if (property.endsWith('+') || property.endsWith('+_')) {
|
25 | return false;
|
26 | }
|
27 |
|
28 | // SCSS or Less interpolation
|
29 | if (hasInterpolation(property)) {
|
30 | return false;
|
31 | }
|
32 |
|
33 | return true;
|
34 | };
|