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.

23 lines
500 B

'use strict';
/**
* Check whether a node is logical combination (`:not`, `:has`, `:matches`)
*
* @param {import('postcss-selector-parser').Pseudo} node postcss-selector-parser node (of type pseudo)
* @return {boolean} If `true`, the combination is logical
*/
module.exports = function isLogicalCombination(node) {
if (node.type === 'pseudo') {
switch (node.value) {
case ':not':
case ':has':
case ':matches':
return true;
default:
return false;
}
}
return false;
};