数通智联化工云平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

26 lines
521 B

'use strict';
const isStandardSyntaxSelector = require('../utils/isStandardSyntaxSelector');
/**
* Check whether a Node is a standard rule
*
* @param {import('postcss').Rule | import('postcss-less').Rule} rule
* @returns {boolean}
*/
module.exports = function isStandardSyntaxRule(rule) {
if (rule.type !== 'rule') {
return false;
}
// Ignore Less &:extend rule
if ('extend' in rule && rule.extend) {
return false;
}
if (!isStandardSyntaxSelector(rule.selector)) {
return false;
}
return true;
};