Write overflow-x and overflow-y with the overflow shorthand in CSS
npm install postcss-short-overflow[![NPM Version][npm-img]][npm-url]
[![Build Status][cli-img]][cli-url]
[![Support Chat][git-img]][git-url]
[PostCSS Short Overflow] lets you write overflow-x and overflow-y with theoverflow shorthand in CSS.
``pcss
html {
overflow: hidden auto;
}
[contenteditable] {
overflow: * auto;
}
/ becomes /
html {
overflow-x: hidden;
overflow-y: auto;
}
[contenteditable] {
overflow-y: auto;
}
`
Add [PostCSS Short Overflow] to your project:
`bash`
npm install postcss-short-overflow --save-dev
Use [PostCSS Short Overflow] to process your CSS:
`js
const postcssShortOverflow = require('postcss-short-overflow');
postcssShortOverflow.process(YOUR_CSS /, processOptions, pluginOptions /);
`
Or use it as a [PostCSS] plugin:
`js
const postcss = require('postcss');
const postcssShortOverflow = require('postcss-short-overflow');
postcss([
postcssShortOverflow(/ pluginOptions /)
]).process(YOUR_CSS /, processOptions /);
`
[PostCSS Short Overflow] runs in all Node environments, with special instructions for:
| Node | PostCSS CLI | Webpack | Create React App | Gulp | Grunt |
| --- | --- | --- | --- | --- | --- |
#### prefix
The prefix option determines the prefix applied to properties being processedx
(e.g. for -x-overflow). Wrapping dashes (-`) are automatically
applied.
[cli-img]: https://img.shields.io/travis/jonathantneal/postcss-short-overflow.svg
[cli-url]: https://travis-ci.org/jonathantneal/postcss-short-overflow
[git-img]: https://img.shields.io/badge/support-chat-blue.svg
[git-url]: https://gitter.im/postcss/postcss
[npm-img]: https://img.shields.io/npm/v/postcss-short-overflow.svg
[npm-url]: https://www.npmjs.com/package/postcss-short-overflow
[PostCSS]: https://github.com/postcss/postcss
[PostCSS Short Overflow]: https://github.com/jonathantneal/postcss-short-overflow