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.

isStandardSyntaxAtRule.js 730B

1234567891011121314151617181920212223242526272829
  1. 'use strict';
  2. /**
  3. * Check whether a at-rule is standard
  4. *
  5. * @param {import('postcss').AtRule | import('postcss-less').AtRule} atRule postcss at-rule node
  6. * @return {boolean} If `true`, the declaration is standard
  7. */
  8. module.exports = function (atRule) {
  9. // Ignore scss `@content` inside mixins
  10. if (!atRule.nodes && atRule.params === '') {
  11. return false;
  12. }
  13. // Ignore Less mixins
  14. if ('mixin' in atRule && atRule.mixin) {
  15. return false;
  16. }
  17. // Ignore Less detached ruleset `@detached-ruleset: { background: red; }; .top { @detached-ruleset(); }`
  18. if (
  19. ('variable' in atRule && atRule.variable) ||
  20. (!atRule.nodes && atRule.raws.afterName === '' && atRule.params[0] === '(')
  21. ) {
  22. return false;
  23. }
  24. return true;
  25. };