Background color visible through the border of a border radius
See original GitHub issueWhen a <View />
component uses backgroundColor
and borderRadius
, the background color is still visible over the edges of the border.
Screenshot:
Example code:
var MyComponent = React.createClass({
render() {
return <View style={styles.example} />
}
});
var styles = StyleSheet.create({
example: {
backgroundColor: 'white',
borderRadius: 16,
borderWidth: 1,
borderColor: 'black'
}
});
Issue Analytics
- State:
- Created 8 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
border-radius + background-color == cropped border
In reality, I'm using a <table> as the inner element with alternating row colors. And I'm using a <div> as the outer element...
Read more >border-radius - CSS-Tricks
Sometimes you can see a background-color “leak” outside of a border when border-radius is present (here's a perfect example).
Read more >border-radius - CSS: Cascading Style Sheets - MDN Web Docs
The border-radius CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, ......
Read more >CSS border-radius property - W3Schools
The border-radius property defines the radius of the element's corners. ... Show demo ❯ ... Set rounded corners for an element with a...
Read more >CSS3 Border Radius - CSS Mine
As a result, users with older browsers simply will not see rounded corners. And what the eye doesn't see, the heart doesn't grieve...
Read more >
Top Related Medium Post
No results found
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
Hi there! Try setting
overflow: hidden
, does that fix it?as @uandco mentioned, the overflow cannot be used together with shadow properties… What is the workaround here?