Socket
Socket
Sign inDemoInstall

postcss-overflow-shorthand

Package Overview
Dependencies
5
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    postcss-overflow-shorthand

Use the overflow shorthand in CSS


Version published
Weekly downloads
6M
increased by3.5%
Maintainers
2
Install size
40.1 kB
Created
Weekly downloads
 

Readme

Source

PostCSS Overflow Shorthand PostCSS Logo

NPM Version CSS Standard Status Build Status Discord

PostCSS Overflow Shorthand lets you use the overflow shorthand in CSS, following the CSS Overflow specification.

'Can I use' table

html {
  overflow: hidden auto;
}

/* becomes */

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

Usage

Add PostCSS Overflow Shorthand to your project:

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

Use it as a PostCSS plugin:

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

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

PostCSS Overflow Shorthand runs in all Node environments, with special instructions for:

NodePostCSS CLIWebpackCreate React AppGulpGrunt

Options

preserve

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

postcssOverflowShorthand({ preserve: false })
html {
  overflow: hidden auto;
}

/* becomes */

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

Keywords

FAQs

Last updated on 08 Jul 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc