Files
dewedev/node_modules/postcss-overflow-shorthand/dist/index.cjs
dwindown 7f2dd5260f Initial commit: Developer Tools MVP with visual editor
- Complete React app with 7 developer tools
- JSON Tool with visual structured editor
- Serialize Tool with visual structured editor
- URL, Base64, CSV/JSON, Beautifier, Diff tools
- Responsive navigation with dropdown menu
- Dark/light mode toggle
- Mobile-responsive design with sticky header
- All tools working with copy/paste functionality
2025-08-02 09:31:26 +07:00

2 lines
843 B
JavaScript

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=e(require("postcss-value-parser"));const r=e=>{const r=!("preserve"in Object(e))||Boolean(e.preserve);return{postcssPlugin:"postcss-overflow-shorthand",Declaration:(e,{result:t})=>{if("overflow"!==e.prop.toLowerCase())return;let s="",a="";const l=e.value;try{const e=o.default(l).nodes.slice().filter((e=>"comment"!==e.type&&"space"!==e.type));if(e.length<2)return;s=o.default.stringify(e[0]),a=o.default.stringify(e[1])}catch(o){return void e.warn(t,`Failed to parse value '${l}' as a shorthand for "overflow". Leaving the original value intact.`)}s&&a&&(s.toLowerCase()===a.toLowerCase()?e.cloneBefore({value:s}):(e.cloneBefore({prop:"overflow-x",value:s}),e.cloneBefore({prop:"overflow-y",value:a})),r||e.remove())}}};r.postcss=!0,module.exports=r;