Add some borders. Fix style override when switching pages

This commit is contained in:
2026-02-12 20:00:43 +01:00
parent ec1c8b0f5b
commit cc417535fa
6 changed files with 54 additions and 58 deletions

View File

@@ -47,13 +47,16 @@ onMount(() => {
return
}
// Custom CSS rules for the whole viewer
document.documentElement.style = css_from_path(nav.path)
// Custom CSS rules for the whole viewer. The MainMenu applies its
// styles to the <html> element. So we apply to the <body> element, our
// styles take precedence since they're lower level, and we can clean it
// up afterwards without overwriting global style
document.body.style = css_from_path(nav.path)
})
return () => {
page_sub()
nav_sub()
document.documentElement.style = ""
document.body.style = ""
}
})