
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
postcss-momentum-scrolling
Advanced tools
PostCSS plugin for adding 'momentum' style scrolling behavior (-webkit-overflow-scrolling: touch) for elements with overflow (scroll, auto) on iOS
PostCSS plugin for adding momentum style scrolling behavior (-webkit-overflow-scrolling:touch
) for elements with overflow (scroll, auto) on iOS.
/* Input example */
.minicart {
overflow: scroll;
}
/* Output example */
.minicart {
overflow: scroll;
-webkit-overflow-scrolling: touch;
}
First thing's, install the module:
npm install postcss-momentum-scrolling --save-dev
Check you project for existed PostCSS config: postcss.config.js
in the project root, "postcss"
section in package.json
or postcss
in bundle config.
If you already use PostCSS, add the plugin to plugins list:
module.exports = {
plugins: [
+ require('postcss-momentum-scrolling')([
+ // example options
+ 'hidden',
+ 'scroll',
+ 'auto',
+ 'inherit'
+ ]),
require('autoprefixer')
]
}
If you do not use PostCSS, add it according to official docs and set this plugin in settings.
If the passed options are not an
Array
, then the default options will be set.
Array
of overflow
property values at which you want to add momentum style scrolling behavior. Default ['hidden', 'scroll', 'auto', 'inherit']
(use only ['scroll']
for minimize css size).
postcss([
require('postcss-momentum-scrolling')([
'hidden',
'inherit'
])
])
/* Before */
header {
overflow: hidden;
}
main {
overflow: scroll;
}
footer {
overflow: inherit;
}
/* After */
header {
overflow: hidden;
-webkit-overflow-scrolling: touch;
}
main {
overflow: scroll;
}
footer {
overflow: inherit;
-webkit-overflow-scrolling: touch;
}
See Releases history
postcss-sort-media-queries
- plugin for combine and sort CSS media queries with mobile first or desktop first methods[3.14.22] 2021-08-20
missed semicolon
error (by @Gusted).FAQs
PostCSS plugin for adding 'momentum' style scrolling behavior (-webkit-overflow-scrolling: touch) for elements with overflow (scroll, auto) on iOS
We found that postcss-momentum-scrolling demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.