Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
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.

isContextFunctionalPseudoClass.js 796B

1234567891011121314151617181920212223
  1. 'use strict';
  2. const keywordSets = require('../reference/keywordSets');
  3. /**
  4. * Check whether a node is a context-functional pseudo-class (i.e. either a logical combination
  5. * or a 'aNPlusBOfSNotationPseudoClasses' / tree-structural pseudo-class)
  6. *
  7. * @param {import('postcss-selector-parser').Pseudo} node postcss-selector-parser node (of type pseudo)
  8. * @return {boolean} If `true`, the node is a context-functional pseudo-class
  9. */
  10. module.exports = function isContextFunctionalPseudoClass(node) {
  11. if (node.type === 'pseudo') {
  12. const normalisedParentName = node.value.toLowerCase().replace(/:+/, '');
  13. return (
  14. keywordSets.logicalCombinationsPseudoClasses.has(normalisedParentName) ||
  15. keywordSets.aNPlusBOfSNotationPseudoClasses.has(normalisedParentName)
  16. );
  17. }
  18. return false;
  19. };