From c0dc1b1c84ea08485ed52e235f107ad9270b938e Mon Sep 17 00:00:00 2001 From: Xylight Date: Wed, 7 Aug 2024 13:21:09 -0700 Subject: [PATCH] fix: weird width --- src/lib/components/ui/layout/Shell.svelte | 16 ++++++++++++---- src/routes/+layout.svelte | 1 - 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/lib/components/ui/layout/Shell.svelte b/src/lib/components/ui/layout/Shell.svelte index 279b3a82..afd28bc2 100644 --- a/src/lib/components/ui/layout/Shell.svelte +++ b/src/lib/components/ui/layout/Shell.svelte @@ -163,9 +163,13 @@ grid-template-areas: 'main'; justify-items: start; } + + .content.limit-width { + max-width: 120rem; + } + .content > * { width: 100%; /* Full width for immediate children */ - padding: 0 1rem; /* Add some padding on smaller screens */ } @media (min-width: 768px) { @@ -183,20 +187,24 @@ grid-template-areas: 'sidebar main suffix'; } - .content:is(.limit-width) { + .content.limit-width { grid-template-columns: 1fr 2fr 1fr; } - :global(.content:is(.limit-width) > *:first-child) { + :global(.content.limit-width > *:first-child) { max-width: 20rem; justify-self: end; width: 100%; } - :global(.content:is(.limit-width) > *:last-child) { + :global(.content.limit-width > *:last-child) { max-width: 20rem; justify-self: start; width: 100%; } + + .main { + width: 100%; + } } diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index f2ce184b..6d9e53ad 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -143,7 +143,6 @@ let:class={c} class="p-4 sm:p-6 min-w-0 w-full flex flex-col h-full relative {c}" style={s} - class:max-w-6xl={$userSettings.newWidth} id="main" >