source: trip-planner-front/node_modules/stylus/lib/functions/prefix-classes.js@ ceaed42

Last change on this file since ceaed42 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 542 bytes
Line 
1var utils = require('../utils');
2
3/**
4 * Prefix css classes in a block
5 *
6 * @param {String} prefix
7 * @param {Block} block
8 * @return {Block}
9 * @api private
10 */
11
12function prefixClasses(prefix, block){
13 utils.assertString(prefix, 'prefix');
14 utils.assertType(block, 'block', 'block');
15
16 var _prefix = this.prefix;
17
18 this.options.prefix = this.prefix = prefix.string;
19 block = this.visit(block);
20 this.options.prefix = this.prefix = _prefix;
21 return block;
22}
23prefixClasses.params = ['prefix', 'block'];
24module.exports = prefixClasses;
Note: See TracBrowser for help on using the repository browser.