> For the complete documentation index, see [llms.txt](https://bryan-guner.gitbook.io/my-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bryan-guner.gitbook.io/my-docs/redux/repos/examples/real-world/node_modules/postcss-overflow-shorthand.md).

# PostCSS Overflow Shorthand

[![NPM Version](https://img.shields.io/npm/v/postcss-overflow-shorthand.svg)](https://www.npmjs.com/package/postcss-overflow-shorthand) [![CSS Standard Status](https://cssdb.org/badge/overflow-property.svg)](https://cssdb.org/#overflow-property) [![Build Status](https://img.shields.io/travis/jonathantneal/postcss-overflow-shorthand.svg)](https://travis-ci.org/jonathantneal/postcss-overflow-shorthand) [![Support Chat](https://img.shields.io/badge/support-chat-blue.svg)](https://gitter.im/postcss/postcss)

[PostCSS Overflow Shorthand](https://github.com/jonathantneal/postcss-overflow-shorthand) lets you use the `overflow` shorthand in CSS, following the [CSS Overflow](https://drafts.csswg.org/css-overflow/#propdef-overflow) specification.

```
html {
  overflow: hidden auto;
}

/* becomes */

html {
  overflow-x: hidden;
  overflow-y: auto;
  overflow: hidden auto;
}
```

## Usage

Add [PostCSS Overflow Shorthand](https://github.com/jonathantneal/postcss-overflow-shorthand) to your project:

```bash
npm install postcss-overflow-shorthand --save-dev
```

Use [PostCSS Overflow Shorthand](https://github.com/jonathantneal/postcss-overflow-shorthand) to process your CSS:

```js
const postcssOverflowShorthand = require('postcss-overflow-shorthand');

postcssOverflowShorthand.process(YOUR_CSS /*, processOptions, pluginOptions */);
```

Or use it as a [PostCSS](https://github.com/postcss/postcss) plugin:

```js
const postcss = require('postcss');
const postcssOverflowShorthand = require('postcss-overflow-shorthand');

postcss([
  postcssOverflowShorthand(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);
```

[PostCSS Overflow Shorthand](https://github.com/jonathantneal/postcss-overflow-shorthand) runs in all Node environments, with special instructions for:

| [Node](https://github.com/bgoonz/Learning-Redux/blob/master/repos/examples/real-world/node_modules/postcss-overflow-shorthand/INSTALL.md#node) | [PostCSS CLI](https://github.com/bgoonz/Learning-Redux/blob/master/repos/examples/real-world/node_modules/postcss-overflow-shorthand/INSTALL.md#postcss-cli) | [Webpack](https://github.com/bgoonz/Learning-Redux/blob/master/repos/examples/real-world/node_modules/postcss-overflow-shorthand/INSTALL.md#webpack) | [Create React App](https://github.com/bgoonz/Learning-Redux/blob/master/repos/examples/real-world/node_modules/postcss-overflow-shorthand/INSTALL.md#create-react-app) | [Gulp](https://github.com/bgoonz/Learning-Redux/blob/master/repos/examples/real-world/node_modules/postcss-overflow-shorthand/INSTALL.md#gulp) | [Grunt](https://github.com/bgoonz/Learning-Redux/blob/master/repos/examples/real-world/node_modules/postcss-overflow-shorthand/INSTALL.md#grunt) |
| ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |

## Options

### preserve

The `preserve` option determines whether the original `overflow` declaration is preserved. By default, it is preserved.

```js
postcssOverflowShorthand({ preserve: false })
```

```
html {
  overflow: hidden auto;
}

/* becomes */

html {
  overflow-x: hidden;
  overflow-y: auto;
}
```
