[6a3a178] | 1 | "use strict";
|
---|
| 2 |
|
---|
| 3 | Object.defineProperty(exports, "__esModule", {
|
---|
| 4 | value: true
|
---|
| 5 | });
|
---|
| 6 | exports.default = void 0;
|
---|
| 7 |
|
---|
| 8 | var _postcssSelectorParser = _interopRequireDefault(require("postcss-selector-parser"));
|
---|
| 9 |
|
---|
| 10 | var _exists = _interopRequireDefault(require("../exists"));
|
---|
| 11 |
|
---|
| 12 | var _isMixin = _interopRequireDefault(require("../isMixin"));
|
---|
| 13 |
|
---|
| 14 | var _plugin = _interopRequireDefault(require("../plugin"));
|
---|
| 15 |
|
---|
| 16 | var _browsers = require("../dictionary/browsers");
|
---|
| 17 |
|
---|
| 18 | var _identifiers = require("../dictionary/identifiers");
|
---|
| 19 |
|
---|
| 20 | var _postcss = require("../dictionary/postcss");
|
---|
| 21 |
|
---|
| 22 | var _tags = require("../dictionary/tags");
|
---|
| 23 |
|
---|
| 24 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
---|
| 25 |
|
---|
| 26 | function analyse(ctx, rule) {
|
---|
| 27 | return selectors => {
|
---|
| 28 | selectors.each(selector => {
|
---|
| 29 | if ((0, _exists.default)(selector, 0, '*') && (0, _exists.default)(selector, 1, ' ') && (0, _exists.default)(selector, 2, _tags.HTML) && (0, _exists.default)(selector, 3, ' ') && selector.at(4)) {
|
---|
| 30 | ctx.push(rule, {
|
---|
| 31 | identifier: _identifiers.SELECTOR,
|
---|
| 32 | hack: selector.toString()
|
---|
| 33 | });
|
---|
| 34 | }
|
---|
| 35 | });
|
---|
| 36 | };
|
---|
| 37 | }
|
---|
| 38 |
|
---|
| 39 | var _default = (0, _plugin.default)([_browsers.IE_5_5, _browsers.IE_6], [_postcss.RULE], function (rule) {
|
---|
| 40 | if ((0, _isMixin.default)(rule)) {
|
---|
| 41 | return;
|
---|
| 42 | }
|
---|
| 43 |
|
---|
| 44 | (0, _postcssSelectorParser.default)(analyse(this, rule)).processSync(rule.selector);
|
---|
| 45 | });
|
---|
| 46 |
|
---|
| 47 | exports.default = _default;
|
---|
| 48 | module.exports = exports.default; |
---|