New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

visible-height-css

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

visible-height-css

Css' `vh`, but working

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

visible-height-css

npm type definitions

Its like css' vh, but working. vh stands for 'viewport height' when most often we care about the visible height. Things like menu bars in mobile browsers dont affect vh while we often want to take them into consideration. See the demo (on a mobile browser with a menu bar) to see the difference.

install

npm i visible-height-css
<script src="https://cdn.jsdelivr.net/npm/visible-height-css/web"></script>

usage

This will set a css var named '--vih'. If no string is passed, defaults to '--visible-height'.

import { setVisibleHeight } from 'visible-height-css'

setVisibleHeight('vih')

Then use it in css

.my-super-class {
	height: calc(100 * var(--vih, /*fallback*/ 1vh));
}

Keywords

visible-height

FAQs

Package last updated on 01 Oct 2019

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