提交学习笔记专用
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.

15 lines
332 B

  1. 'use strict';
  2. /**
  3. * @param {import('postcss').Rule} node
  4. * @return {boolean}
  5. */
  6. module.exports = function isMixin(node) {
  7. const { selector } = node;
  8. // If the selector ends with a ':' it is likely a part of a custom mixin.
  9. if (!selector || selector[selector.length - 1] === ':') {
  10. return true;
  11. }
  12. return false;
  13. };