better sizing

This commit is contained in:
Ondřej Žára 2020-06-22 22:25:35 +02:00
parent f8dea00d8f
commit a727f75bfe
4 changed files with 16 additions and 2 deletions

View file

@ -4,7 +4,7 @@ cyp-app {
box-sizing: border-box; box-sizing: border-box;
margin: 0 auto; margin: 0 auto;
max-width: 800px; max-width: 800px;
height: 100vh; height: calc(100px * var(--vh));
font-family: lato, sans-serif; font-family: lato, sans-serif;
font-size: 16px; font-size: 16px;

File diff suppressed because one or more lines are too long

View file

@ -1807,3 +1807,10 @@ class Library extends Component {
} }
customElements.define("cyp-library", Library); customElements.define("cyp-library", Library);
function updateSize() {
document.body.style.setProperty("--vh", window.innerHeight/100);
}
window.addEventListener("resize", updateSize);
updateSize();

View file

@ -11,3 +11,10 @@ import "./elements/library.js";
import "./elements/tag.js"; import "./elements/tag.js";
import "./elements/back.js"; import "./elements/back.js";
import "./elements/path.js"; import "./elements/path.js";
function updateSize() {
document.body.style.setProperty("--vh", window.innerHeight/100);
}
window.addEventListener("resize", updateSize);
updateSize();