githubEdit

PostCSS Overflow Shorthand

NPM Versionarrow-up-right CSS Standard Statusarrow-up-right Build Statusarrow-up-right Support Chatarrow-up-right

PostCSS Overflow Shorthandarrow-up-right lets you use the overflow shorthand in CSS, following the CSS Overflowarrow-up-right specification.

html {
  overflow: hidden auto;
}

/* becomes */

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

Usage

Add PostCSS Overflow Shorthandarrow-up-right to your project:

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

Use PostCSS Overflow Shorthandarrow-up-right to process your CSS:

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

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

Or use it as a PostCSSarrow-up-right plugin:

PostCSS Overflow Shorthandarrow-up-right runs in all Node environments, with special instructions for:

Options

preserve

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

Last updated

Was this helpful?