source: trip-planner-front/node_modules/postcss-gap-properties/index.es.mjs@ 1ad8e64

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

initial commit

  • Property mode set to 100644
File size: 661 bytes
Line 
1import postcss from 'postcss';
2
3const gapPropertyRegExp = /^(column-gap|gap|row-gap)$/i;
4var index = postcss.plugin('postcss-gap-properties', opts => {
5 const preserve = 'preserve' in Object(opts) ? Boolean(opts.preserve) : true;
6 return root => {
7 // for each shorthand gap, column-gap, or row-gap declaration
8 root.walkDecls(gapPropertyRegExp, decl => {
9 // insert a grid-* fallback declaration
10 decl.cloneBefore({
11 prop: `grid-${decl.prop}`
12 }); // conditionally remove the original declaration
13
14 if (!preserve) {
15 decl.remove();
16 }
17 });
18 };
19});
20
21export default index;
22//# sourceMappingURL=index.es.mjs.map
Note: See TracBrowser for help on using the repository browser.