Skip to content

Instantly share code, notes, and snippets.

@seancolsen
Created October 11, 2020 18:39
Show Gist options
  • Select an option

  • Save seancolsen/491df96e4faf0b455fe9ba724c17d52a to your computer and use it in GitHub Desktop.

Select an option

Save seancolsen/491df96e4faf0b455fe9ba724c17d52a to your computer and use it in GitHub Desktop.
full-height-test
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width, height=device-height, initial-scale=1, user-scalable=no, viewport-fit=cover">
</head>
<body>
<div id='layout'>
<svg
class='test-graphic'
viewBox='-1 -1 2 2'
width='100%' height='100%'
preserveAspectRatio="none"
>
<path d='M 0,-1 L 1,0 L 0,1 L -1,0 Z' />
</svg>
</div>
</body>
<style>
body {
margin: 0;
padding: 0;
font-size: calc(1vh + 1vw);
height: 100vh;
width: 100vw;
overflow: hidden;
}
#layout {
width: 100%;
height: 100%;
}
</style>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment