mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-14 10:09:31 -07:00
refactor: replace svh with a more compatible approach (#252)
* first attempt * second attempt * blind commit
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
@import '_core/mixins';
|
||||
|
||||
:root {
|
||||
--window-height: 100svh;
|
||||
--window-height: 100vh;
|
||||
--nav-height: 2rem;
|
||||
--space-standard: 0.625rem;
|
||||
|
||||
|
||||
@@ -18,6 +18,16 @@
|
||||
{{- partial "plugin/style.html" $style -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* fuck safari */}}
|
||||
<script>
|
||||
function z() {
|
||||
const r = document.querySelector(':root')
|
||||
r.style.setProperty('--window-height', `${window.innerHeight}px`)
|
||||
}
|
||||
z()
|
||||
window.addEventListener('resize', z, { passive: true })
|
||||
</script>
|
||||
|
||||
{{/* main js */}}
|
||||
{{- $script := dict "Link" "/bundled/js/main.js" "Defer" true "Esm" true -}}
|
||||
{{- partial "plugin/script.html" $script -}}
|
||||
|
||||
Reference in New Issue
Block a user