You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.0 KiB

4 years ago
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _plugin = require('../plugin');
  6. var _plugin2 = _interopRequireDefault(_plugin);
  7. var _isMixin = require('../isMixin');
  8. var _isMixin2 = _interopRequireDefault(_isMixin);
  9. var _browsers = require('../dictionary/browsers');
  10. var _identifiers = require('../dictionary/identifiers');
  11. var _postcss = require('../dictionary/postcss');
  12. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  13. exports.default = (0, _plugin2.default)([_browsers.IE_5_5, _browsers.IE_6, _browsers.IE_7], [_postcss.RULE], function (rule) {
  14. if ((0, _isMixin2.default)(rule)) {
  15. return;
  16. }
  17. const { selector } = rule;
  18. const trim = selector.trim();
  19. if (trim.lastIndexOf(',') === selector.length - 1 || trim.lastIndexOf('\\') === selector.length - 1) {
  20. this.push(rule, {
  21. identifier: _identifiers.SELECTOR,
  22. hack: selector
  23. });
  24. }
  25. });
  26. module.exports = exports['default'];