Skip to content

[tabs] Snap indicator to device pixels#4716

Closed
atomiks wants to merge 5 commits intomui:masterfrom
atomiks:codex/tabs-indicator-device-pixel-snap
Closed

[tabs] Snap indicator to device pixels#4716
atomiks wants to merge 5 commits intomui:masterfrom
atomiks:codex/tabs-indicator-device-pixel-snap

Conversation

@atomiks
Copy link
Copy Markdown
Contributor

@atomiks atomiks commented May 1, 2026

Tabs indicators could inherit sub-device-pixel edges from fractional layout measurements, which made border-aligned indicators look slightly blurry. (Noticed in #4676) This snaps hydrated interior active-tab edges to the device pixel grid while preserving boundary edges that need to stay flush with the tab list or an adjacent panel border.

Changes

  • Snap interior active-tab edges with the device pixel ratio in hydrated positioning.
  • Keep first/last tab boundary edges flush with the tab list so bordered indicators can connect to panel borders.
  • Keep the inline prehydration script lightweight and restore its existing fallback dimension behavior.
  • Add Chromium coverage for fractional horizontal and vertical tab edges, boundary-edge alignment, and the cross-axis scrollbar regression.

@atomiks atomiks added component: tabs Changes related to the tabs component. type: bug It doesn't behave as expected. labels May 1, 2026 — with ChatGPT Codex Connector
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 1, 2026

commit: a3b41d0

@code-infra-dashboard
Copy link
Copy Markdown

code-infra-dashboard Bot commented May 1, 2026

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 🔺+243B(+0.05%) 🔺+108B(+0.07%)

Details of bundle changes

Performance

Total duration: 1,248.43 ms 🔺+61.47 ms(+5.2%) | Renders: 53 (+0) | Paint: 1,908.70 ms 🔺+74.21 ms(+4.0%)

Test Duration Renders
Checkbox mount (500 instances) 93.58 ms 🔺+28.33 ms(+43.4%) 1 (+0)
Select mount (200 instances) 142.34 ms 🔺+14.53 ms(+11.4%) 3 (+0)
Select open (500 options) 56.48 ms 🔺+7.16 ms(+14.5%) 14 (+0)
Popover mount (300 instances) 93.37 ms 🔺+5.19 ms(+5.9%) 2 (+0)
Dialog mount (300 instances) 78.46 ms 🔺+4.95 ms(+6.7%) 2 (+0)

…and 7 more — details


Check out the code infra dashboard for more information about this PR.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 1, 2026

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit a3b41d0
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/69f81537f860f30008af7112
😎 Deploy Preview https://deploy-preview-4716--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@atomiks atomiks force-pushed the codex/tabs-indicator-device-pixel-snap branch from 8b2e97f to 0840332 Compare May 1, 2026 01:32
@atomiks atomiks force-pushed the codex/tabs-indicator-device-pixel-snap branch from 124b705 to 2ecf6af Compare May 4, 2026 03:08
@atomiks atomiks requested a review from aarongarciah May 4, 2026 03:08
@atomiks atomiks closed this May 6, 2026
@atomiks atomiks deleted the codex/tabs-indicator-device-pixel-snap branch May 6, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: tabs Changes related to the tabs component. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant