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.

[Borders] Lines visible with borderRadius, borderWidth and borderColor

See original GitHub issue

There’s a rendering issue when using borderRadius, borderWidth and borderColor, you see lines appearing between each border:

screen shot 2015-07-22 at 14 22 01

The above image was produced with the following code on the latest master (75b220d6cee2d2ccda25f420628454cf198e5466), same happens with the latest released version (0.7.1):

'use strict';

var React = require('react-native');
var {
  AppRegistry,
  StyleSheet,
  Text,
  View,
} = React;

var SampleApp = React.createClass({
  render: function() {
    return (
      <View style={styles.container}>
        <View style={styles.circle}/>
      </View>
    );
  }
});

var styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  circle: {
    width: 100,
    height: 100,
    borderRadius: 50,
    borderWidth: 20,
    borderColor: 'green',
  },
});

AppRegistry.registerComponent('SampleApp', () => SampleApp);

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rjoonascommented, Nov 17, 2015

Another example of rendering glitches that appear when using both border width and border radius on React Native 0.14.2:

Screenshot Code
img_0003 <View style={{ backgroundColor: '#e6e6e6', borderWidth: 1, width: 70, height: 70, borderTopLeftRadius: 10 }}></View>
img_0004 <View style={{ backgroundColor: '#e6e6e6', width: 70, height: 70, borderTopLeftRadius: 10 }}></View>

This glitch is only visible when I run the app on my device, not in iOS simulator. If nested inside a ScrollView, the glitch lines flicker around when scrolling.

Read more comments on GitHub >

github_iconTop Results From Across the Web

border-color - CSS: Cascading Style Sheets - MDN Web Docs
This is a box with a border around it. Each side can be set individually using border-top-color , border-right-color , border-bottom-color , ...
Read more >
border-radius - CSS-Tricks
The border-radius property takes between one and four length or percentage values, where one value sets the radius for all four corners at...
Read more >
Borders - MUI System
Borders ; border · 1 · borderTop ; border · 0 · borderTop ; borderColor · 'primary.main' · borderColor ...
Read more >
Borders · Bootstrap v5.0
Use border utilities to quickly style the border and border-radius of an element. ... Change the border color using utilities built on our...
Read more >
Add border to a Container with borderRadius in Flutter
It's not possible to add border : and borderRadius: at the same time, you'll get this error: A borderRadius can only be given...
Read more >

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