nebari-dev / nebari-dev/starlight

Table border wider than inner grid below 50rem

Open Beginner friendly
#28 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: user experience 👩🏻‍💻
Dominant language
CSS
Stars
0
Forks
0
Avg merge
2d 21h
Merged PRs (30d)
7

Description

Symptom

On viewports below 50rem, a table's outer box (border + radius) spans the full content width, while the actual columns stop short of the right edge. Visible on /reference/kitchen-sink/Supported providers.

Cause

packages/starlight/src/styles/components.css sets display: block; width: 100%; overflow-x: auto on the <table> so a 4-column table's 40rem minimum scrolls locally instead of widening the page.

display: block sizes the element box (where the border lives). thead / tbody stay a real table and size to the 10rem cell minimums. When the viewport is < 50rem but wider than columns × 10rem (a 3-column table only needs 30rem), the box is full width and the grid is not.

Fix when we pick this up

Either:

.sl-markdown-content table :is(thead, tbody) {
  display: table;
  width: 100%;
}

or wrap the table in a dedicated scroller and keep the table as display: table; width: 100%.

Do not drop the 10rem cell minimums — that crushes 4-column tables on phones.

Related

PR https://github.com/nebari-dev/starlight/pull/27 (mobile page-scroll vs table-scroll).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with packages/starlight/src/styles/components.css and reproduce the Supported providers table on /reference/kitchen-sink/ below 50rem. Compare the outer border with the inner grid at different column counts, then verify the chosen fix preserves the 10rem cell minimums and keeps the grid aligned with the table border without widening the page.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.