
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
vh-unit-support
Advanced tools
This polyfile is needed to support svh, dvh, lvh units in older browsers. Basically, support is needed for mobile devices, which do not yet have such extensive support, but the polyfile also takes into account situations when a user may have a fairly old version of a browser that does not have support.
⚠️At the moment, the library is ready for use, but there may be cases that were not taken into account during the tests, pay attention to this
The polyfile adds a custom property, in the form of 1 unit (--1svh, --1dvh, --1lvh). These units are updated automatically when the screen size changes, when the device orientation changes, and set values at initial boot. The polyfile takes into account the SSR. It is possible to install the necessary units yourself
npm install vh-unit-support
import initVHPolyfill from "vh-unit-support";
// All 3 units will be generated
initVHPolyfill();
// If necessary, specify the parameters you need and only they will be generated
initVHPolyfill(["svh", "dvh"]);
.dvh-element {
height: calc(var(--1dvh, 1vh) * 50); /* polyfill create 50dvh; */
height: 50dvh; /* will be used if supported */
}
An important point is that the polyfil must be higher than the standard use in order to correctly work out the specificity
// An example of a function on SCSS
@function viewport-height($height, $unit) {
@return calc(var(--1#{$unit}, 1vh) * #{$height});
}
.element {
--42dvh: viewport-height(42, "dvh");
height: var(--42dvh);
}
// or
.element {
height: viewport-height(42, "dvh");
}
FAQs
Polyfill for support svh, dvh, lvh for CSS units
We found that vh-unit-support 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.