Using teleport for tooltips. Moved theme class to body tag with UI observer.

This commit is contained in:
DebaucheryLibrarian
2020-12-27 02:15:06 +01:00
parent 12f247a927
commit 229d74d266
9 changed files with 172 additions and 160 deletions

View File

@@ -4,24 +4,34 @@
<slot />
</div>
<div class="tooltip">
<div class="tooltip-wrapper">
<slot name="popover" />
<teleport to="body">
<div class="tooltip">
<div class="tooltip-wrapper">
<slot name="tooltip" />
</div>
</div>
</div>
</teleport>
</div>
</template>
<script>
</script>
<style lang="scss" scoped>
.tooltip-container {
position: relative;
font-size: 1rem;
}
.tooltip-frame {
position: fixed;
}
.tooltip {
position: absolute;
z-index: 10;
top: 2rem;
background: var(--background);
background: var(--background-light);
}
</style>