Skip to content

Conversation

@artus9033
Copy link
Contributor

Summary

This PR fixes an edge case with (likely) subpixel rendering rounding issue in specific layouts, likely due to odd widths of the Button component. In such cases, the component in non-focused state would be displayed with the background purple color remaining in the view box of the button by 1px from the left:

Screenshot 2025-07-18 at 13 41 06 Screenshot 2025-07-18 at 13 41 13

The workaround is to extend the left rectangle's width by an extra margin of 1px.

Thanks to @thymikee for suggesting the idea for this workaround!

Test plan

Test the RN Legal docs, where the "CLI" button used to suffer from this issue.

@artus9033 artus9033 requested a review from jbroma July 18, 2025 12:40
@artus9033 artus9033 self-assigned this Jul 18, 2025
@github-actions github-actions bot added the release: bug fix Bug Fix label Jul 18, 2025
@artus9033 artus9033 force-pushed the fix/button-background-edge-case branch from 6e0b65b to 6cdd811 Compare July 18, 2025 12:49
@jbroma jbroma merged commit 59508f7 into main Jul 18, 2025
2 checks passed
@jbroma jbroma deleted the fix/button-background-edge-case branch July 18, 2025 12:51
@jbroma
Copy link
Member

jbroma commented Jul 18, 2025

Thanks! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants