@csstools/postcss-logical-overscroll-behavior
Use logical overscroll behavior properties and values in CSS
Last updated 3 months ago by romainmenke .
MIT-0 · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @csstools/postcss-logical-overscroll-behavior 
SYNC missed versions from official npm registry.

PostCSS Logical Overscroll Behavior PostCSS Logo

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 */);

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

Current Tags

  • 2.0.0                                ...           latest (3 months ago)

3 Versions

  • 2.0.0                                ...           3 months ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE