[Borders] Lines visible with borderRadius, borderWidth and borderColor
See original GitHub issueThere’s a rendering issue when using borderRadius
, borderWidth
and borderColor
, you see lines appearing between each border:

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:
- Created 8 years ago
- Comments:6 (4 by maintainers)
Top 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 >
Top Related Medium Post
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Another example of rendering glitches that appear when using both border width and border radius on React Native 0.14.2:
<View style={{ backgroundColor: '#e6e6e6', borderWidth: 1, width: 70, height: 70, borderTopLeftRadius: 10 }}></View>
<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.Fixed in https://github.com/facebook/react-native/commit/b115277d00f54fa7af5d61062c9e3cf362b7c5da