diff --git a/packages/client/src/components/app/Grid.svelte b/packages/client/src/components/app/Grid.svelte index 1c50d8c5b9..761d5a4378 100644 --- a/packages/client/src/components/app/Grid.svelte +++ b/packages/client/src/components/app/Grid.svelte @@ -2,7 +2,7 @@ import { getContext } from "svelte" const component = getContext("component") - const { styleable } = getContext("sdk") + const { styleable, builderStore } = getContext("sdk") export let cols = 12 export let rows = 12 @@ -11,6 +11,7 @@ // Deliberately non-reactive as we want this fixed whenever the grid renders const defaultColSpan = Math.ceil((cols + 1) / 2) + console.log(defaultColSpan) const defaultRowSpan = Math.ceil((rows + 1) / 2) $: coords = generateCoords(rows, cols) @@ -37,16 +38,20 @@ "--rows": rows, "--default-col-span": defaultColSpan, "--default-row-span": defaultRowSpan, + padding: "0 !important", + gap: "0 !important", }, }} data-rows={rows} data-cols={cols} > -
- {#each coords as coord} -
- {/each} -
+ {#if $builderStore.inBuilder} +
+ {#each coords as coord} +
+ {/each} +
+ {/if}
@@ -69,6 +74,8 @@ grid-column-end: var(--default-col-span); grid-row-start: 1; grid-row-end: var(--default-row-span); + max-height: 100%; + max-width: 100%; } .grid { @@ -94,7 +101,6 @@ .underlay { z-index: -1; } - .placeholder { background-color: var(--spectrum-global-color-gray-100); }