Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid sidebar scrollbar hiding behind navbar #1353

Merged
merged 3 commits into from
Jan 9, 2024
Merged

Conversation

delucis
Copy link
Member

@delucis delucis commented Jan 9, 2024

Description

For sidebars that are long enough to scroll (e.g. Astro Docs or on smaller screens), the scrollbar currently spans the entire viewport height, meaning its top part is behind the nav bar.

Instead of using padding-top to push sidebar content down into view, this PR uses inset to position the sidebar directly at that point, so the the scrollbar is fully visible.

I think this closes #1350 if I understood correctly.

Copy link

vercel bot commented Jan 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
starlight ✅ Ready (Inspect) Visit Preview Jan 9, 2024 7:41pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
starlight-i18n ⬜️ Ignored (Inspect) Visit Preview Jan 9, 2024 7:41pm

Copy link

changeset-bot bot commented Jan 9, 2024

🦋 Changeset detected

Latest commit: 5c830ea

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/starlight Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the 🌟 core Changes to Starlight’s main package label Jan 9, 2024
@astrobot-houston
Copy link
Collaborator

astrobot-houston commented Jan 9, 2024

size-limit report 📦

Path Size
/index.html 5.21 KB (-0.04% 🔽)
/_astro/*.js 21.42 KB (0%)
/_astro/*.css 13.05 KB (+0.03% 🔺)

Copy link
Member

@TheOtterlord TheOtterlord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, lgtm!

@delucis
Copy link
Member Author

delucis commented Jan 9, 2024

Awesome, thanks for checking @TheOtterlord!

@delucis delucis merged commit 90fe8da into main Jan 9, 2024
9 checks passed
@delucis delucis deleted the dx-919/sidebar-scrollbar branch January 9, 2024 19:44
@astrobot-houston astrobot-houston mentioned this pull request Jan 9, 2024
HiDeoo added a commit to HiDeoo/starlight that referenced this pull request Jan 15, 2024
* main: (55 commits)
  [ci] format
  i18n(es): Update `index` (withastro#1360)
  [ci] format
  i18n(fr): Update index (withastro#1367)
  i18n(es): remove extra section (withastro#1370)
  i18n(ko-KR): update `index.mdx` (withastro#1363)
  [ci] format
  i18n(zh-cn): Update index.mdx (withastro#1361)
  docs(showcase): add OpenSaaS.sh (withastro#1359)
  feat(Testimonials): add testimonials to website (withastro#1104)
  [ci] format
  [ci] release (withastro#1332)
  fix: autogenerated sidebar alphabetical sort (withastro#1298)
  Avoid sidebar scrollbar hiding behind navbar (withastro#1353)
  Use spawnSync instead of execaSync in `git.ts` (withastro#1347)
  [ci] format
  [i18nIgnore] Add src alias (withastro#1322)
  Italian translation for search.devWarning (withastro#1351)
  [ci] format
  i18n(pt-BR): Add translation for `guides/sidebar` (withastro#1346)
  ...
HiDeoo added a commit to HiDeoo/starlight that referenced this pull request Jan 15, 2024
* main: (69 commits)
  [i18nIgnore] docs: `pnpm install` → `pnpm add` (withastro#1324)
  [ci] format
  i18n(zh-cn): Update frontmatter.mdx (withastro#1362)
  [ci] format
  i18n(es): Update `index` (withastro#1360)
  [ci] format
  i18n(fr): Update index (withastro#1367)
  i18n(es): remove extra section (withastro#1370)
  i18n(ko-KR): update `index.mdx` (withastro#1363)
  [ci] format
  i18n(zh-cn): Update index.mdx (withastro#1361)
  docs(showcase): add OpenSaaS.sh (withastro#1359)
  feat(Testimonials): add testimonials to website (withastro#1104)
  [ci] format
  [ci] release (withastro#1332)
  fix: autogenerated sidebar alphabetical sort (withastro#1298)
  Avoid sidebar scrollbar hiding behind navbar (withastro#1353)
  Use spawnSync instead of execaSync in `git.ts` (withastro#1347)
  [ci] format
  [i18nIgnore] Add src alias (withastro#1322)
  ...
HiDeoo added a commit to HiDeoo/starlight that referenced this pull request Jan 15, 2024
* main: (62 commits)
  [i18nIgnore] docs: `pnpm install` → `pnpm add` (withastro#1324)
  [ci] format
  i18n(zh-cn): Update frontmatter.mdx (withastro#1362)
  [ci] format
  i18n(es): Update `index` (withastro#1360)
  [ci] format
  i18n(fr): Update index (withastro#1367)
  i18n(es): remove extra section (withastro#1370)
  i18n(ko-KR): update `index.mdx` (withastro#1363)
  [ci] format
  i18n(zh-cn): Update index.mdx (withastro#1361)
  docs(showcase): add OpenSaaS.sh (withastro#1359)
  feat(Testimonials): add testimonials to website (withastro#1104)
  [ci] format
  [ci] release (withastro#1332)
  fix: autogenerated sidebar alphabetical sort (withastro#1298)
  Avoid sidebar scrollbar hiding behind navbar (withastro#1353)
  Use spawnSync instead of execaSync in `git.ts` (withastro#1347)
  [ci] format
  [i18nIgnore] Add src alias (withastro#1322)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 core Changes to Starlight’s main package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Left sidebar scroll bar problem
3 participants