From c9214e91b74bc323dfa8d413e82f4160908a84c9 Mon Sep 17 00:00:00 2001 From: Valexr Date: Mon, 20 May 2024 10:22:08 +0200 Subject: [PATCH] cleanup --- src/App.svelte | 3 +-- src/css/base.css | 11 +++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index 34d7f6e..e47f196 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -15,7 +15,6 @@ export let name: Name; let active: string | undefined; - let WH = 0; function intersection(section: HTMLElement) { const observer = new IntersectionObserver(observe, { threshold: 1 }); @@ -30,7 +29,7 @@ setVH(); window.onresize = setVH; function setVH() { - const vh = window.innerHeight * 0.01; + const vh = window.outerHeight * 0.01; document.documentElement.style.setProperty('--vh', `${vh}px`); } } diff --git a/src/css/base.css b/src/css/base.css index d5b8db3..1da37bb 100644 --- a/src/css/base.css +++ b/src/css/base.css @@ -8,23 +8,22 @@ html { html::before { content: ''; background: rgba(0, 0, 0, 0.27); - position: absolute; + position: fixed; z-index: -1; inset: 0; - overflow: hidden; } html::after { content: attr(title); - position: absolute; + position: fixed; + inset: 0; bottom: 0; - right: 0; - left: 0; + top: auto; font-size: 0.8rem; font-weight: 300; font-family: inherit; - opacity: 0.69; text-align: center; + opacity: 0.69; } body {