Skip to content

Instantly share code, notes, and snippets.

@DennisLypovetsky
Last active May 19, 2019 09:23
Show Gist options
  • Select an option

  • Save DennisLypovetsky/d94391b5bdad97a1e7020225d0b04e62 to your computer and use it in GitHub Desktop.

Select an option

Save DennisLypovetsky/d94391b5bdad97a1e7020225d0b04e62 to your computer and use it in GitHub Desktop.
hero-height.js
// Правит не работающую как надо формулу CSS height: 100vh
const height = Math.max(document.documentElement.clientHeight, window.innerHeight || 0)
document.getElementsByClassName('YOURCLASS')[0].style['min-height'] = height + 'px'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment