Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IOS] there is an extra tiny line when set border and border-radius to a View #49799

Open
zarin-maruf opened this issue Mar 4, 2025 · 7 comments
Labels
Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. Newer Patch Available Platform: iOS iOS applications.

Comments

@zarin-maruf
Copy link

zarin-maruf commented Mar 4, 2025

Description

When I add a border and border-radius to a View, an extra tiny line with the same color as the View background is created. This line will be explicitly visible when you set the background and border to the same color.

This happens on IOS only btw.

Steps to reproduce

  1. add the following code to your component you can see the issue
<View style={{ width: 200, height: 200, backgroundColor: 'white', padding: 20 }}>
      <View
       style={{
         width: 30,
         height: 30,
         backgroundColor: 'blue',
         borderRadius: 50,
         borderWidth: 5,
         borderColor: 'white',
         borderStyle: 'solid',
       }}
      />
   </View>

React Native Version

0.76.5

Affected Platforms

Runtime - iOS, Build - MacOS

Output of npx @react-native-community/cli info

System:
  OS: macOS 13.7.3
  CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
  Memory: 2.30 GB / 16.00 GB
  Shell:
    version: 3.2.57
    path: /bin/bash
Binaries:
  Node:
    version: 22.0.0
    path: ~/.nvm/versions/node/v22.0.0/bin/node
  Yarn:
    version: 4.5.0
    path: ~/.nvm/versions/node/v22.0.0/bin/yarn
  npm:
    version: 10.5.1
    path: ~/.nvm/versions/node/v22.0.0/bin/npm
  Watchman:
    version: 2024.11.04.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2022.3 AI-223.8836.35.2231.10811636
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.13
    path: /Library/Java/JavaVirtualMachines/openjdk-17.jdk/Contents/Home/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

info React Native v0.78.0 is now available (your project is running on v0.76.7).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.78.0
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.76.7&to=0.78.0
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".

Stacktrace or Logs

Not Set

Reproducer

https://codesandbox.io/p/live/38941380-ed25-44a0-afae-83260029f2c1

Screenshots and Videos

Image

@react-native-bot react-native-bot added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Mar 4, 2025
@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - 0.76.7. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot
Copy link
Collaborator

Warning

Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:

@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@cortinico
Copy link
Contributor

Does this happen on both old and new arch?

@zarin-maruf
Copy link
Author

Does this happen on both old and new arch?

Yes, it does.

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Mar 4, 2025
@cortinico cortinico removed the Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. label Mar 10, 2025
@cortinico
Copy link
Contributor

codesandbox.io/p/live/38941380-ed25-44a0-afae-83260029f2c1

@zarin-maruf can you provide either a Snack or a reproducer using https://github.com/react-native-community/reproducer-react-native ?

@zarin-maruf
Copy link
Author

@cortinico cortinico added Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. and removed Needs: Attention Issues where the author has responded to feedback. labels Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. Newer Patch Available Platform: iOS iOS applications.
Projects
None yet
Development

No branches or pull requests

3 participants