fix: hydration style mismatch

pull/4493/head
Robin Kehl 8 months ago
parent 3cd3aee817
commit 0516c1d4f6

@ -1,16 +1,7 @@
<script setup lang="ts">
import { useWindowSize } from '@vueuse/core'
const { width: vw } = useWindowSize({
initialWidth: 0,
includeScrollbar: false
})
</script>
<template> <template>
<div <div
class="vp-doc container" class="vp-doc container"
:style="vw ? { '--vp-offset': `calc(50% - ${vw / 2}px)` } : {}" style="--vp-offset: calc(50% - 50vw)"
> >
<slot /> <slot />
</div> </div>

Loading…
Cancel
Save