PostCSS Short Overflow
PostCSS Short Overflow lets you write overflow-x
and overflow-y
with the
overflow
shorthand in CSS.
html { overflow: hidden auto;} [contenteditable] { overflow: * auto;} /* becomes */ html { overflow-x: hidden; overflow-y: auto;} [contenteditable] { overflow-y: auto;}
Usage
Add PostCSS Short Overflow to your project:
npm install postcss-short-overflow --save-dev
Use PostCSS Short Overflow to process your CSS:
const postcssShortOverflow = ; postcssShortOverflow;
Or use it as a PostCSS plugin:
const postcss = ;const postcssShortOverflow = ; ;
PostCSS Short Overflow runs in all Node environments, with special instructions for:
Node | PostCSS CLI | Webpack | Create React App | Gulp | Grunt |
---|
Options
prefix
The prefix
option determines the prefix applied to properties being processed
(e.g. x
for -x-overflow
). Wrapping dashes (-
) are automatically
applied.