Skip to content

Commit

Permalink
default to position:relative;
Browse files Browse the repository at this point in the history
  • Loading branch information
mhkeller committed Apr 27, 2020
1 parent 5d36bff commit ca00162
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/LayerCake.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
export let ssr = false;
export let pointerEvents = true;
export let position = 'relative';
export let width = undefined;
export let height = undefined;
Expand Down Expand Up @@ -281,7 +282,7 @@
{#if (ssr === true || typeof window !== 'undefined')}
<div
class="layercake-container"
style="{pointerEvents === false ? 'pointer-events:none;' : ''}"
style="position:{position};{position === 'absolute' ? 'top:0;left:0;' : ''}{pointerEvents === false ? 'pointer-events:none;' : ''}'}"
bind:clientWidth={containerWidth}
bind:clientHeight={containerHeight}
>
Expand All @@ -297,8 +298,5 @@
.layercake-container {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
</style>

0 comments on commit ca00162

Please sign in to comment.