From c9ca4ebe10f4776999e3fff4ac4c19ac0a714bac Mon Sep 17 00:00:00 2001 From: Bryce Russell Date: Mon, 12 Jun 2023 17:29:50 -0500 Subject: Fix bottom padding for sidebar on larger screens (#193) * Fix bottom padding for sidebar on larger screens - Adds `padding-bottom` to the second to last element in the sidebar on screen sizes larger than mobile * Simplify selector * Create thirty-emus-check.md * Remove old padding code--- .changeset/thirty-emus-check.md | 5 +++++ packages/starlight/components/Sidebar.astro | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 .changeset/thirty-emus-check.md diff --git a/.changeset/thirty-emus-check.md b/.changeset/thirty-emus-check.md new file mode 100644 index 00000000..e94f8159 --- /dev/null +++ b/.changeset/thirty-emus-check.md @@ -0,0 +1,5 @@ +--- +"@astrojs/starlight": patch +--- + +Fix bottom padding for sidebar on larger screen sizes diff --git a/packages/starlight/components/Sidebar.astro b/packages/starlight/components/Sidebar.astro index dd318701..935b150c 100644 --- a/packages/starlight/components/Sidebar.astro +++ b/packages/starlight/components/Sidebar.astro @@ -28,13 +28,15 @@ const { sidebar, locale } = Astro.props; gap: 1rem; } - .sidebar > :global(:last-child) { - padding-bottom: 1rem; - } - .mobile-preferences { justify-content: space-between; border-top: 1px solid var(--sl-color-gray-6); padding: 0.5rem 0; } + + @media (min-width: 50rem) { + .sidebar > :global(:nth-last-child(2)) { + padding-bottom: 1rem; + } + } -- cgit