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.

BorderColor and borderWidth are missing when using borderRadius

See original GitHub issue

Is 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

screenshot_1514990797

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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
ADcorpocommented, Mar 2, 2018

This is still happenning as of now (React Native 0.54)

2reactions
usfslkcommented, Oct 19, 2018

Also happens on react.js, borderWidth and borderColor are ignored if borderRadius is set to a default value

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

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