Skip to content

bugfix: prevent select text descenders from being clipped - #4577

Open
anastasiia-baboshina wants to merge 4 commits into
skeletonlabs:mainfrom
anastasiia-baboshina:bugfix/select-descender-clipping
Open

anastasiia-baboshina wants to merge 4 commits into
skeletonlabs:mainfrom
anastasiia-baboshina:bugfix/select-descender-clipping

Conversation

@anastasiia-baboshina

@anastasiia-baboshina anastasiia-baboshina commented Oct 14, 2026 •

Copy link
Copy Markdown

Linked Issue(s)

Closes #4540

Description

The select utility sets line-height: var(--field-size) (1rem at the default size, so a line-height of exactly 1). On platforms where the browser applies line-height to a native <select> (the issue reports Windows 10 with Chrome/Edge, with Yu Gothic UI, Segoe UI and Montserrat), this clips the descenders of letters like g, y and p.

This sets line-height: normal on select, as suggested in the issue. padding-block is unchanged. Text inputs are already clamped to at least normal by the browser, so the select height now matches the input height.

Testing on real Windows 11 (Chromium 152, device pixel ratio 1.25) with the skeleton.dev forms page: the native select honors line-height (computed 16px), and the descender of "g" in "Los Angeles" is clipped with system-ui (Cerberus), Segoe UI, Yu Gothic UI and the font stack of the Crimson theme. With line-height: normal it is no longer clipped in any of them, and the select height matches the input (about 35.3px vs 35.6px in Cerberus, 35.9px vs 35.85px in Crimson). line-height: 1.5 also fixes the clipping, but makes the select 2-5px taller than the input. The select grows from about 30px to about 35px, which is the intended outcome since it now matches the input.

On macOS and Linux (Chromium, Firefox, WebKit) the computed line-height of a native select is already normal, so the bug does not reproduce there. I also compared before/after in headless Chromium on macOS with a static page built from the package CSS, emulating non-macOS rendering with appearance: none (select height 30px before, 31-35px after, matching the input). format:check, lint:check and check pass.

Not tested: Chrome and Edge themselves (I tested the Chromium engine they share), Firefox on Windows, Montserrat itself (not installed on the test machine, only the fallback stack of the Crimson theme), and the field-xs/field-lg/field-3xl sizes.

This PR was prepared with the help of Claude Code.

Checklist

Please read our contribution requirements and make sure you have:

  • Prefixed your branch name with: docs/, feature/, task/, bugfix/
  • Targeted the main branch
  • Documented any changes made
  • Supplied a changeset (if changes were made to any project within /packages)

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
www.skeleton.dev Ready Ready Preview Nov 13, 2026 3:57pm UTC

Request Review

@vercel

vercel Bot commented Oct 14, 2026

Copy link
Copy Markdown

@anastasiia-baboshina is attempting to deploy a commit to the Skeleton Labs Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot

changeset-bot Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0825a87

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

This PR includes changesets to release 6 packages
Name Type
@skeletonlabs/skeleton Patch
@skeletonlabs/skeleton-svelte Patch
skeleton Patch
@skeletonlabs/docs Patch
@skeletonlabs/skeleton-common Patch
@skeletonlabs/skeleton-react 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

@anastasiia-baboshina
anastasiia-baboshina marked this pull request as ready for review October 14, 2026 18:14
@Hugos68

Hugos68 commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

I'm going to require input from @endigo9740 here, I'm not sure if we should hardcode a normal value. Maybe we can set it as the default variable value instead?

This branch was successfully deployed

2 active (1 outdated) deployments
Preview – www.skeleton.dev — 9e6d2463 Deployed Nov 13, 2026 by vercel[bot]
Preview – themes.skeleton.dev — 0825a87e Deployed Nov 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text descenders in select are clipped in some fonts

2 participants