Warn when borderRadius is used without borderWidth
See original GitHub issueWhen a <View />
component specifies borderRadius
, it will only show up if borderWidth
is specified as well.
Example code (borderRadius not showing up):
var MyComponent = React.createClass({
render() {
return <View style={styles.example} />;
}
});
var styles = StyleSheet.create({
example: {
borderRadius: 4,
width: 100,
height: 100
}
});
Example code (borderRadius showing up):
var MyComponent = React.createClass({
render() {
return <View style={styles.example} />;
}
});
var styles = StyleSheet.create({
example: {
borderRadius: 4,
borderWidth: 1,
borderColor: 'black',
width: 100,
height: 100
}
});
It would be amazing to show a warning when borderRadius
is used without borderWidth
. There is an exception though: For <Image />
components the borderWidth
does not need to be specified for the border radius to show up.
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Border Radius not rounding corners in react native
I just started learning react native and am trying to write some practice programs, but for some reason I haven't been able to...
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 ... This is used to set a single radius for...
Read more >Borders · Bootstrap v5.0
Use border utilities to quickly style the border and border-radius of an element. Great for images, buttons, or any other element.
Read more >CSS Border-Radius Can Do That? - 9elements
TL/DR: When you use eight values specifying border-radius in CSS, you can create organic looking shapes. WOW. No time to read it all...
Read more >CSS Border Radius - TutorialBrain
As, CSS border Radius is used to set rounded borders and to provide rounded corners around any element, tags or div, we use...
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
@brentvatne Seems like it works fine when i use TouchableHighlight instead of TouchableOpacity
Having the same issues on 4.4.4