From 308b3aaeb0122af81a12514a81e160910f93d7a7 Mon Sep 17 00:00:00 2001 From: Lorenzo Lewis Date: Mon, 24 Jul 2023 23:30:50 +0100 Subject: Fix: Site title/logo overflow (#373) Co-authored-by: Chris Swithinbank --- .changeset/fresh-scissors-relax.md | 5 +++++ packages/starlight/components/Header.astro | 9 +++------ packages/starlight/style/props.css | 1 - 3 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 .changeset/fresh-scissors-relax.md 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; -- cgit