This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/stylus/lib/functions/prefix-classes.js
2019-08-11 20:48:02 +02:00

22 lines
484 B
JavaScript

var utils = require('../utils');
/**
* Prefix css classes in a block
*
* @param {String} prefix
* @param {Block} block
* @return {Block}
* @api private
*/
module.exports = function prefixClasses(prefix, block){
utils.assertString(prefix, 'prefix');
utils.assertType(block, 'block', 'block');
var _prefix = this.prefix;
this.options.prefix = this.prefix = prefix.string;
block = this.visit(block);
this.options.prefix = this.prefix = _prefix;
return block;
};