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.

findAtRuleContext.js 449B

1234567891011121314151617181920212223
  1. 'use strict';
  2. /**
  3. * Find the at-rule in which a rule is nested.
  4. *
  5. * Returns `null` if the rule is not nested within an at-rule.
  6. *
  7. * @param {import('postcss').Rule} rule
  8. * @returns {null | import('postcss').AtRule}
  9. */
  10. module.exports = function findAtRuleContext(rule) {
  11. const parent = rule.parent;
  12. if (parent.type === 'root') {
  13. return null;
  14. }
  15. if (parent.type === 'atrule') {
  16. return parent;
  17. }
  18. return findAtRuleContext(parent);
  19. };