react-native-web icon indicating copy to clipboard operation
react-native-web copied to clipboard

borderBottomWidth only works when all 4 sides are explicitly defined

Open respectTheCode opened this issue 10 years ago • 4 comments

When defining border widths the bottom width is ignored if the other 3 sides are not explicitly defined

    works: {
        borderBottomColor: "#F00",
        borderTopWidth: 0,
        borderLeftWidth: 0,
        borderBottomWidth: 1,
        borderRightWidth: 0
    },
    doesNotWork1: {
        borderBottomColor: "#F00",
        borderBottomWidth: 1
    },
    doesNotWork2: {
        borderBottomColor: "#F00",
        borderWidth: 0,
        borderBottomWidth: 1
    },
    doesNotWork3: {
        borderBottomColor: "#F00",
        borderTopWidth: 0,
        borderLeftWidth: 0,
        borderBottomWidth: 1
    }

respectTheCode avatar May 11 '16 20:05 respectTheCode

I recently got the same issue (I was thinking I was doing something wrong as I don't use react-native yet).

MoOx avatar May 16 '16 08:05 MoOx

border[top|right|bottom|left]-style is none by default. Can that be the reason why you don't see any border?

giuseppeg avatar Jun 11 '16 16:06 giuseppeg

I hit this problem, or at least similar, where I wanted a border at the bottom only. The following worked for me:

  borderBottomWidth: 1,
  borderBottomStyle: 'solid',
  borderBottomColor: 'black',

If i remove the borderBottomStyle then it doesn't work, so I think giuseppeg is likely right.

miketheanimal avatar Jun 28 '16 13:06 miketheanimal

I'm looking into this now

necolas avatar Jul 05 '16 23:07 necolas