first commit
This commit is contained in:
19
node_modules/stylelint/lib/utils/isScssVariable.mjs
generated
vendored
Normal file
19
node_modules/stylelint/lib/utils/isScssVariable.mjs
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Check whether a property is SCSS variable
|
||||
*
|
||||
* @param {string} property
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export default function isScssVariable(property) {
|
||||
// SCSS var (e.g. $var: x), list (e.g. $list: (x)) or map (e.g. $map: (key:value))
|
||||
if (property.startsWith('$')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// SCSS var within a namespace (e.g. namespace.$var: x)
|
||||
if (property.includes('.$')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user