Last change
on this file since 84d0fbb was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
874 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | "use strict";
|
---|
| 2 |
|
---|
| 3 | Object.defineProperty(exports, "__esModule", {
|
---|
| 4 | value: true
|
---|
| 5 | });
|
---|
| 6 |
|
---|
| 7 | var _postcss = require("postcss");
|
---|
| 8 |
|
---|
| 9 | var _postcss2 = _interopRequireDefault(_postcss);
|
---|
| 10 |
|
---|
| 11 | var _replaceRuleSelector = require("./replaceRuleSelector");
|
---|
| 12 |
|
---|
| 13 | var _replaceRuleSelector2 = _interopRequireDefault(_replaceRuleSelector);
|
---|
| 14 |
|
---|
| 15 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
---|
| 16 |
|
---|
| 17 | function explodeSelectors() {
|
---|
| 18 | var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
---|
| 19 |
|
---|
| 20 | return function (css) {
|
---|
| 21 | css.walkRules(function (rule) {
|
---|
| 22 | if (rule.selector && rule.selector.indexOf(":matches") > -1) {
|
---|
| 23 | rule.selector = (0, _replaceRuleSelector2.default)(rule, options);
|
---|
| 24 | }
|
---|
| 25 | });
|
---|
| 26 | };
|
---|
| 27 | }
|
---|
| 28 |
|
---|
| 29 | exports.default = _postcss2.default.plugin("postcss-selector-matches", explodeSelectors);
|
---|
| 30 | module.exports = exports.default; |
---|
Note:
See
TracBrowser
for help on using the repository browser.