#Header search placement inconsistency

4 messages · Page 1 of 1 (latest)

sturdy bobcat
#

The search box in the header appears further left when showing index.mdx content than it does when displaying any other page with a sidebar. On the surface this isn't a big deal, but it appears the search container doesn't care how wide the site title is. For instance, if my site title is boldandbrad docs, the search bar overlaps part of the title instead of moving further right.

I've dug around in the inspector to see if I could apply a custom css rule to fix this, but I haven't found a solution yet.

Is this a bug in starlight or is there a simple fix to my issue?

urban kilnBOT
#
Still waiting for an answer?

It looks like no-one has responded to your question yet. People might not be available right now or don’t know how to answer your question. Want an answer while you wait? Try asking our experimental bot in #1095492539085230272.

hearty crater
#

I added this to my customCss to push the search bar over:

:root,
::backdrop {
  --sl-title-min-width: 39rem;
}

I'm not aware of a way to make it automatic based on your title length, but this got the job done for me.

sturdy bobcat
#

I’ll try it out. Thank you so much for the reply!