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

[Borders] Halo shows through rounded borders #2017

Closed
ide opened this issue Jul 16, 2015 · 10 comments
Closed

[Borders] Halo shows through rounded borders #2017

ide opened this issue Jul 16, 2015 · 10 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@ide
Copy link
Contributor

ide commented Jul 16, 2015

If you have a view with a background color that is different than the border's color, the background color seeps through the rounded borders.

example

Repro:

  <Text style={styles.marker}>1</Text>

  marker: {
    color: 'white',
    backgroundColor: 'blue',
    width: 17,
    height: 17,
    lineHeight: 15,
    borderWidth: 1.5,
    borderColor: 'white',
    borderRadius: 17 / 2,
    overflow: 'hidden',
  }
@ide ide assigned a2 Jul 16, 2015
@sahrens
Copy link
Contributor

sahrens commented Jul 16, 2015

As far as I can tell this is just an iOS bug - do you know if there is much we can do about it besides custom drawing? We're already doing come custom drawing for multiple border radii so more custom drawing isn't out of the question.

cc @a2, @nicklockwood

On Jul 16, 2015, at 6:12 AM, James Ide notifications@github.com wrote:

If you have a view with a background color that is different than the border's color, the background color seeps through the rounded borders.

Repro:

1

marker: {
color: 'white',
backgroundColor: 'blue',
width: 17,
height: 17,
lineHeight: 15,
borderWidth: 1.5,
borderColor: 'white',
borderRadius: 17 / 2,
overflow: 'hidden',
}

Reply to this email directly or view it on GitHub.

@nicklockwood
Copy link
Contributor

Yeah, we still need to fix a few bugs in the border drawing to make it behave more like CSS. I can't tell at a glance whether it's using standard iOS drawing in this case, or our custom implementation, though I'd assume it's the former since the radii are equal.

@sahrens
Copy link
Contributor

sahrens commented Jul 16, 2015

We've had this problem since before the custom borders so I'm pretty sure it's just an iOS thing.

On Jul 16, 2015, at 1:19 PM, Nick Lockwood notifications@github.com wrote:

Yeah, we still need to fix a few bugs in the border drawing to make it behave more like CSS. I can't tell at a glance whether it's using standard iOS drawing in this case, or our custom implementation, though I'd assume it's the former since the radii are equal.


Reply to this email directly or view it on GitHub.

@ide
Copy link
Contributor Author

ide commented Jul 16, 2015

Yeah, this is iOS's rendering. Unfortunately it repros on iOS 9b3 as well.

@admmasters
Copy link
Contributor

I guess we should file a radar with Apple, in this case. Presumably as iOS9 is believed to be a bug fixing type update, its a good time for things like this to be addressed. Maybe I'm expecting too much :-D

@grabbou
Copy link
Contributor

grabbou commented Jul 21, 2015

BTW, can this be related somehow to #1870 ?

@ide
Copy link
Contributor Author

ide commented Jul 21, 2015

@grabbou This issue is different and has to do with Apple's implementation of cornerRadius.

@mkonicek
Copy link
Contributor

Hi there! This issue is being closed because it has been inactive for a while.

But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/borders-halo-shows-through-rounded-borders-

ProductPains helps the community prioritize the most important issues thanks to its voting feature.
It is easy to use - just login with GitHub.

Also, if this issue is a bug, please consider sending a PR with a fix.
We're a small team and rely on the community for bug fixes of issues that don't affect fb apps.

@nikoloza
Copy link

nikoloza commented Dec 4, 2017

The same issue here. Problem with borderWidth + borderRadius rendering:

image

@nikoloza
Copy link

nikoloza commented Dec 6, 2017

Actually, using boxShadows instead of border did the great workaround.

@facebook facebook locked as resolved and limited conversation to collaborators Jul 22, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

9 participants