summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryce Russell2023-06-12 17:29:50 -0500
committerGitHub2023-06-13 00:29:50 +0200
commitc9ca4ebe10f4776999e3fff4ac4c19ac0a714bac (patch)
tree3e185010cdbf30eda9844453f1c4ae17b565a713
parenta3809e4f1e14f3949e9e25f7ffbdea2920408edb (diff)
downloadIT.starlight-c9ca4ebe10f4776999e3fff4ac4c19ac0a714bac.tar.gz
IT.starlight-c9ca4ebe10f4776999e3fff4ac4c19ac0a714bac.tar.bz2
IT.starlight-c9ca4ebe10f4776999e3fff4ac4c19ac0a714bac.zip
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
-rw-r--r--.changeset/thirty-emus-check.md5
-rw-r--r--packages/starlight/components/Sidebar.astro10
2 files changed, 11 insertions, 4 deletions
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;
+ }
+ }
</style>