New:Socket for Asana Is Now Available.Learn more
Get Started

postcss-dvh

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-dvh

## polyfills for css dvh property

latest
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

postcss-dvh

polyfills for css dvh property

height: 100vh;

to

height: 100vh;
height: calc(var(--vh, 1vh) * 100);
height: 100dvh;
height: calc(100vh - 500px);

to

height: calc(calc(var(--vh, 1vh) * 10) - 500px);

Limitation

need js to fully function, call below code block at the entry of your project

const vh = document.documentElement.clientHeight * 0.01;
document.documentElement.style.setProperty("--vh", `${vh}px`);

TODO

  • dvw support

FAQs

Package last updated on 24 Apr 2024

Related posts