isLessVariable.js 329 B

123456789101112
  1. 'use strict';
  2. const hasBlock = require('./hasBlock');
  3. /**
  4. * @param {import('postcss').AtRule} atRule
  5. * @returns {boolean}
  6. */
  7. module.exports = function (atRule) {
  8. // @ts-ignore TODO TYPES LESS property variable does not exists in types
  9. return (atRule.type === 'atrule' && atRule.variable && !hasBlock(atRule)) || false;
  10. };