replaceSymbols.js 692 B

12345678910111213141516171819202122
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _replaceValueSymbols = require('./replaceValueSymbols.js');
  6. var _replaceValueSymbols2 = _interopRequireDefault(_replaceValueSymbols);
  7. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  8. var replaceSymbols = function replaceSymbols(css, replacements) {
  9. css.walkDecls(function (decl) {
  10. return decl.value = (0, _replaceValueSymbols2.default)(decl.value, replacements);
  11. });
  12. css.walkAtRules('media', function (atRule) {
  13. return atRule.params = (0, _replaceValueSymbols2.default)(atRule.params, replacements);
  14. });
  15. };
  16. exports.default = replaceSymbols;