source: trip-planner-front/node_modules/css-blank-pseudo/postcss.mjs@ 571e0df

Last change on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 721 bytes
RevLine 
[6a3a178]1import postcss from 'postcss';
2
3const selectorRegExp = /:blank([^\w-]|$)/gi;
4var postcss$1 = postcss.plugin('css-blank-pseudo', opts => {
5 const replaceWith = String(Object(opts).replaceWith || '[blank]');
6 const preserve = Boolean('preserve' in Object(opts) ? opts.preserve : true);
7 return root => {
8 root.walkRules(selectorRegExp, rule => {
9 const selector = rule.selector.replace(selectorRegExp, ($0, $1) => {
10 return `${replaceWith}${$1}`;
11 });
12 const clone = rule.clone({
13 selector
14 });
15
16 if (preserve) {
17 rule.before(clone);
18 } else {
19 rule.replaceWith(clone);
20 }
21 });
22 };
23});
24
25export default postcss$1;
26//# sourceMappingURL=postcss.mjs.map
Note: See TracBrowser for help on using the repository browser.