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.
2 lines
1.3 KiB
2 lines
1.3 KiB
2 years ago
|
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=e(require("postcss-value-parser")),t=new Map([["block,flow","block"],["block,flow-root","flow-root"],["inline,flow","inline"],["inline,flow-root","inline-block"],["run-in,flow","run-in"],["list-item,block,flow","list-item"],["inline,flow,list-item","inline list-item"],["block,flex","flex"],["inline,flex","inline-flex"],["block,grid","grid"],["inline,grid","inline-grid"],["inline,ruby","ruby"],["block,table","table"],["inline,table","inline-table"],["table-cell,flow","table-cell"],["table-caption,flow","table-caption"],["ruby-base,flow","ruby-base"],["ruby-text,flow","ruby-text"]]);const n=e=>{const n=!("preserve"in Object(e))||Boolean(e.preserve);return{postcssPlugin:"postcss-normalize-display-values",prepare(){const e=new Map;return{Declaration:{display(i){const o=i.value;if(!o)return;if(e.has(o))return void(i.value!==e.get(o)&&(n?i.cloneBefore({value:e.get(o)}):i.value=e.get(o)));const r=function(e){const{nodes:n}=l.default(e);if(1===n.length)return e;const i=n.filter((e=>"word"===e.type)).map((e=>e.value.toLowerCase()));if(i.length<=1)return e;return t.get(i.join(","))||e}(o);i.value!==r&&(n?i.cloneBefore({value:r}):i.value=r),e.set(o,r)}}}}}};n.postcss=!0,module.exports=n;
|