Skip to content

fix(ios): prevent missing hairlineWidth border strokes at subpixel Y … - #58162

Open
shashikant-panchal wants to merge 1 commit into
react:mainfrom
shashikant-panchal:fix/hairline-border-rendering-offset
Open

fix(ios): prevent missing hairlineWidth border strokes at subpixel Y …#58162
shashikant-panchal wants to merge 1 commit into
react:mainfrom
shashikant-panchal:fix/hairline-border-rendering-offset

Conversation

@shashikant-panchal

@shashikant-panchal shashikant-panchal commented Aug 27, 2026

Copy link
Copy Markdown

Summary:

Fixes #58054

Fixes an issue on iOS (Fabric & Legacy renderer) where StyleSheet.hairlineWidth border strokes disappeared when views landed at certain subpixel Y offsets. Removed ceil() rounding from stretchable border image size calculations in RCTBorderDrawing.m and updated CALayer.contentsCenter calculation in RCTViewComponentView.mm and RCTView.m to compute cap sizes dynamically.

Changelog:

[IOS] [BREAKING] - Prevent StyleSheet.hairlineWidth border strokes from disappearing at subpixel Y offsets (#58054) - althought this is a fix, it alters how the apps renders.

Test Plan:

  • Rendered views with borderBottomWidth: StyleSheet.hairlineWidth at various fractional Y offsets (y = 100.1, 100.333, 100.5, 100.7).
  • Verified 1:1 image cap slice mapping without transparent padding, ensuring hairline border lines remain visible across @2x (0.5pt) and @3x (0.333pt) displays at all offsets.

@meta-cla

meta-cla Bot commented Aug 27, 2026

Copy link
Copy Markdown

Hi @shashikant-panchal!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@meta-cla

meta-cla Bot commented Aug 27, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 27, 2026
@meta-cla

meta-cla Bot commented Aug 27, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Aug 27, 2026

@cipolleschi cipolleschi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix. I can try to import this as it makes sense on paper, but it might alter how the app behaves. Next release (0.88) is going to be a non breaking change releases, so we have to wait to land this change after we cut the branch (7th of Sept)

@3x

3x commented Aug 28, 2026

Copy link
Copy Markdown

👀

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

border stroke of StyleSheet.hairlineWidthnot always rendered

3 participants