question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Border color bleeding bug when border radius is set.

See original GitHub issue

img_8660

As you can see in the picture, border colors are bleeding when borderRadius is set. It only happens when I use corner border radius such as borderBottomLeftRadius, borderBottomRightRadius.

Here’s style for the node:

    borderWidth: StyleSheet.hairlineWidth,
    borderRightWidth: StyleSheet.hairlineWidth,
    borderBottomWidth: 2 * StyleSheet.hairlineWidth,
    borderColor: colors.itemBorder,
    borderRightColor: '#bbbcbd',
    borderBottomColor: '#bbbcbd',
    borderBottomLeftRadius: 4,
    borderBottomRightRadius: 4,
    overflow: 'hidden',

I’ve tried with different colors and it still happens.

Tested both on iOS simulator and real device iPhone 6 Plus. Same bug. Haven’t tested on Android.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:9
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
jevakalliocommented, Nov 13, 2016

There was an issue https://github.com/facebook/react-native/issues/6082 that was closed by @lacker for lack of reproducible example.

Here’s a minimal repro on RNPlay: https://rnplay.org/apps/XiWz1g - It appears this issue happens when you provide border radius to some corners, but not all. Affects iOS only.

screen shot 2016-11-13 at 10 45 30
3reactions
thomasobrien99commented, Nov 10, 2016

+1 to this issue, screenshot from iPhone 6. Style for node is: scaleLevels: { backgroundColor: colors.deepSkyBlue1, borderColor: colors.deepSkyBlue1, borderRadius: dimensions.borderRadius, // 4 borderWidth: dimensions.borderWidth, // 1 flexDirection: ‘row’ }, scaleLevel: { alignItems: ‘center’, borderColor: colors.deepSkyBlue1, borderLeftWidth: dimensions.borderWidth // 1, flex: 1, height: dimensions.scaleLevelHeight, justifyContent: ‘center’ }, scaleLevelFirst: { borderBottomLeftRadius: 3, borderLeftWidth: 0, borderTopLeftRadius: 3 }, scaleLevelLast: { borderBottomRightRadius: 3, borderTopRightRadius: 3 } image

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS border radius background colour bleed - Stack Overflow
I suspect the cause is the same across browsers: the elements are being cropped separately and the anti-aliasing allows bleed. The fix would...
Read more >
[help] [bug] chrome background color "bleeds" on border ...
I have an img inside of a figure element. figure element has a border-radius and background-color. img inside the figure should be cut...
Read more >
Incorrect background-color bleeds on cell corners using ...
Set ROW background-color, then target one CELL in ROW and give it a new background-color plus a border-radius:>0. Actual results: The exposed corners...
Read more >
491574 - border-radius bleeds background-color - Monorail
Issue 491574: border-radius bleeds background-color ... Steps to reproduce the problem: ... No black color shows up where corners are rounded.
Read more >
border-radius - CSS-Tricks
You can give any element “rounded corners” by applying a border-radius through CSS. You'll only notice if there is a color change involved....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found