summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenzo Lewis2023-07-24 23:30:50 +0100
committerGitHub2023-07-25 00:30:50 +0200
commit308b3aaeb0122af81a12514a81e160910f93d7a7 (patch)
tree7e766027c1adc460c2d541a65c700d6c3154febb
parentb0224d7a4f6bc471b8ae3aaa89a1c0ac3f737119 (diff)
downloadIT.starlight-308b3aaeb0122af81a12514a81e160910f93d7a7.tar.gz
IT.starlight-308b3aaeb0122af81a12514a81e160910f93d7a7.tar.bz2
IT.starlight-308b3aaeb0122af81a12514a81e160910f93d7a7.zip
Fix: Site title/logo overflow (#373)
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
-rw-r--r--.changeset/fresh-scissors-relax.md5
-rw-r--r--packages/starlight/components/Header.astro9
-rw-r--r--packages/starlight/style/props.css1
3 files changed, 8 insertions, 7 deletions
diff --git a/.changeset/fresh-scissors-relax.md b/.changeset/fresh-scissors-relax.md
new file mode 100644
index 00000000..06ad0ef3
--- /dev/null
+++ b/.changeset/fresh-scissors-relax.md
@@ -0,0 +1,5 @@
+---
+"@astrojs/starlight": patch
+---
+
+Fix visual overflow for wide logos
diff --git a/packages/starlight/components/Header.astro b/packages/starlight/components/Header.astro
index 258a1a06..06994c2e 100644
--- a/packages/starlight/components/Header.astro
+++ b/packages/starlight/components/Header.astro
@@ -57,14 +57,11 @@ const { locale } = Astro.props;
);
display: grid;
grid-template-columns:
- /* 1 (site title): runs up until the main content column’s left edge. */
- max(
- var(--sl-title-min-width),
- calc(
+ /* 1 (site title): runs up until the main content column’s left edge or the width of the title, whichever is the largest */
+ minmax(calc(
var(--__sidebar-width) +
max(0rem, var(--__main-column-fr) - var(--sl-nav-gap))
- )
- )
+ ), auto)
/* 2 (search box): all free space that is available. */
1fr
/* 3 (right items): use the space that these need. */
diff --git a/packages/starlight/style/props.css b/packages/starlight/style/props.css
index 8788587e..b7e328a6 100644
--- a/packages/starlight/style/props.css
+++ b/packages/starlight/style/props.css
@@ -96,7 +96,6 @@
--sl-nav-height: 3.5rem;
--sl-nav-pad-x: 1rem;
--sl-nav-pad-y: 0.75rem;
- --sl-title-min-width: 10rem;
--sl-mobile-toc-height: 3rem;
--sl-sidebar-width: 18.75rem;
--sl-sidebar-pad-x: 1rem;