BorderColor and borderWidth are missing when using borderRadius
See original GitHub issueIs this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment: OS: Windows 10 Node: 8.6.0 Yarn: Not Found npm: 5.3.0 Watchman: Not Found Xcode: N/A Android Studio: Version 3.0.0.0 AI-171.4443003
Packages: (wanted => installed) react: 16.0.0 => 16.0.0 react-native: 0.50.3 => 0.50.3
Steps to Reproduce
Minimal example:
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default class App extends React.Component {
render() {
return (
<View style={styles.container}>
<View style={[styles.view, styles.withBottomBorder]}>
<Text>Only bottom border with color</Text>
</View>
<View style={[styles.view, styles.withBorderRadius]}>
<Text>Only bottom border with radius</Text>
</View>
<View style={[styles.view, styles.withBorderRadius, styles.withBottomBorder]}>
<Text>Bottom border with radius and color, but only backgroundColor applies, green bottom border is missing</Text>
</View>
<View style={[styles.view, styles.withBottomBorder, styles.withBorderRadius]} >
<Text>Bottom border with color and radius, but only backgroundColor applies, green bottom border is missing</Text>
</View>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
view: {
width: 200,
height: 100,
backgroundColor: '#ffa',
margin: 10,
padding: 10
},
withBorderRadius: {
borderTopRightRadius: 5,
borderTopLeftRadius: 5
/* the same is ofr the borderBottomRight/Left */
},
withBottomBorder: {
borderBottomColor: '#0f0',
borderBottomWidth: 1,
backgroundColor: '#faa'
}
});
Expected Behavior
Last two should look like first one, but with border radius at the top.
Actual Behavior
Border is missing when using borderRadius
Reproducible Demo
Look minimal example above with screens.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:13 (1 by maintainers)
Top Results From Across the Web
css - border-radius not working - Stack Overflow
Sometimes you can apply border-radius to a wrapper container and it will work nicely. For example, I was trying to set border-radius to...
Read more >How to create a border radius in CSS - Educative.io
How to use border-radius. The border-radius property can have one to four values. The corners are rounded depending on the value passed into...
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 >border-top-left-radius - CSS: Cascading Style Sheets | MDN
The border-top-left-radius CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major ...
Read more >HTML Table Borders - W3Schools
To add a border, use the CSS border property on table , th , and td elements: ... With the border-radius property, the...
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 FreeTop 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
Top GitHub Comments
This is still happenning as of now (React Native 0.54)
Also happens on react.js, borderWidth and borderColor are ignored if borderRadius is set to a default value