source: trip-planner-front/node_modules/csso/lib/replace/index.js

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

initial commit

  • Property mode set to 100644
File size: 740 bytes
Line 
1var walk = require('css-tree').walk;
2var handlers = {
3 Atrule: require('./Atrule'),
4 AttributeSelector: require('./AttributeSelector'),
5 Value: require('./Value'),
6 Dimension: require('./Dimension'),
7 Percentage: require('./Percentage'),
8 Number: require('./Number'),
9 String: require('./String'),
10 Url: require('./Url'),
11 Hash: require('./color').compressHex,
12 Identifier: require('./color').compressIdent,
13 Function: require('./color').compressFunction
14};
15
16module.exports = function(ast) {
17 walk(ast, {
18 leave: function(node, item, list) {
19 if (handlers.hasOwnProperty(node.type)) {
20 handlers[node.type].call(this, node, item, list);
21 }
22 }
23 });
24};
Note: See TracBrowser for help on using the repository browser.