important.js 770 B

123456789101112131415161718192021222324252627
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _plugin = require('../plugin');
  6. var _plugin2 = _interopRequireDefault(_plugin);
  7. var _browsers = require('../dictionary/browsers');
  8. var _postcss = require('../dictionary/postcss');
  9. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  10. exports.default = (0, _plugin2.default)([_browsers.IE_5_5, _browsers.IE_6, _browsers.IE_7], [_postcss.DECL], function (decl) {
  11. const match = decl.value.match(/!\w/);
  12. if (match) {
  13. const hack = decl.value.substr(match.index, decl.value.length - 1);
  14. this.push(decl, {
  15. identifier: '!important',
  16. hack
  17. });
  18. }
  19. });
  20. module.exports = exports['default'];