starlight icon indicating copy to clipboard operation
starlight copied to clipboard

Tabs: Remove margin-bottom being used to hide border.

Open shubham-padia opened this issue 1 month ago β€’ 5 comments

Description

We were setting margin-bottom as -2px when at the same time we had a bottom border of 2px. Using this indirect margin was causing the tab container to be greater in height than it's wrapper when we zoomed out from the default zoom level. This introduced an unnecessary scroll bar.

Zoom Level Before After
90% Screenshot 2025-11-03 at 4 01 35 PM Screenshot 2025-11-03 at 4 01 43 PM
100% Screenshot 2025-11-03 at 3 53 30 PM Screenshot 2025-11-03 at 3 53 57 PM

I'm not sure if this PR warrants a minor version bump or not, let me know if it does.

shubham-padia avatar Nov 03 '25 10:11 shubham-padia

πŸ¦‹ Changeset detected

Latest commit: 235239501172e0059951b285adffa38eaecd6da1

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 Minor

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

changeset-bot[bot] avatar Nov 03 '25 10:11 changeset-bot[bot]

Deploy Preview for astro-starlight ready!

Name Link
Latest commit 235239501172e0059951b285adffa38eaecd6da1
Latest deploy log https://app.netlify.com/projects/astro-starlight/deploys/6929d0aa2c867d000869d6ad
Deploy Preview https://deploy-preview-3521--astro-starlight.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Nov 03 '25 10:11 netlify[bot]

Updated the PR @delucis ! Let me know if we want this to be part of a patch release instead of minor.

shubham-padia avatar Nov 03 '25 13:11 shubham-padia

I guess this may be fixable with a box-shadow instead of removing the border, but didn't investigate further yet.

Ah, good catch. We probably need the box-shadow on [role=tab] as well to avoid this.

delucis avatar Nov 04 '25 11:11 delucis

Sorry for the delay, made the requested changes!

shubham-padia avatar Nov 11 '25 10:11 shubham-padia