Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@csstools/postcss-logical-overscroll-behavior

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@csstools/postcss-logical-overscroll-behavior

Use logical overscroll behavior properties and values in CSS

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
352K
decreased by-56.74%
Maintainers
3
Weekly downloads
 
Created
Source

PostCSS Logical Overscroll Behavior PostCSS Logo

npm version CSS Standard Status Build Status Discord

npm install @csstools/postcss-logical-overscroll-behavior --save-dev

PostCSS Logical Overscroll Behavior lets you use overscroll-behavior-inline and overscroll-behavior-block properties following the CSS Overscroll Specification.

.inline {
	overscroll-behavior-inline: auto;
}

.block {
	overscroll-behavior-block: contain;
}

/* becomes */

.inline {
	overscroll-behavior-x: auto;
}

.block {
	overscroll-behavior-y: contain;
}

Usage

Add PostCSS Logical Overscroll Behavior to your project:

npm install postcss @csstools/postcss-logical-overscroll-behavior --save-dev

Use it as a PostCSS plugin:

const postcss = require('postcss');
const postcssLogicalOverscrollBehavior = require('@csstools/postcss-logical-overscroll-behavior');

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

PostCSS Logical Overscroll Behavior runs in all Node environments, with special instructions for:

Options

inlineDirection

The inlineDirection option allows you to specify the direction of the inline axe. The default value is left-to-right, which would match any latin language.

You should tweak this value so that it is specific to your language and writing mode.

postcssLogicalOverscrollBehavior({
	inlineDirection: 'top-to-bottom'
})
.inline {
	overscroll-behavior-inline: auto;
}

.block {
	overscroll-behavior-block: contain;
}

/* becomes */

.inline {
	overscroll-behavior-y: auto;
}

.block {
	overscroll-behavior-x: contain;
}

Each direction must be one of the following:

  • top-to-bottom
  • bottom-to-top
  • left-to-right
  • right-to-left

Keywords

FAQs

Package last updated on 31 Oct 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc