Description
On Android, the logical border-radius props borderEndStartRadius and borderStartEndRadius are mapped to the wrong physical corners. borderEndStartRadius renders at the top-right, but per the CSS
spec (and iOS) it should be at the bottom-left. The two props are swapped. iOS maps them correctly.
Bug location
Android — endStart/startEnd are swapped in the LTR (and RTL) branches of resolve():
|
return when (layoutDirection) { |
|
LayoutDirection.LTR -> |
|
ensureNoOverlap( |
|
topLeft = |
|
(startStart ?: topStart ?: topLeft ?: uniform)?.let { |
|
CornerRadii(it, width, height) |
|
} ?: zeroRadii, |
|
topRight = |
|
(endStart ?: topEnd ?: topRight ?: uniform)?.let { |
|
CornerRadii(it, width, height) |
|
} ?: zeroRadii, |
|
bottomLeft = |
|
(startEnd ?: bottomStart ?: bottomLeft ?: uniform)?.let { |
|
CornerRadii(it, width, height) |
|
} ?: zeroRadii, |
|
bottomRight = |
|
(endEnd ?: bottomEnd ?: bottomRight ?: uniform)?.let { |
|
CornerRadii(it, width, height) |
|
} ?: zeroRadii, |
|
width = width, |
|
height = height, |
|
) |
Steps to reproduce
import { StyleSheet, Text, View } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
export default function Radius() {
const insets = useSafeAreaInsets();
return (
<View style={[styles.container, { paddingTop: insets.top }]}>
<View style={[styles.box, styles.roundedEs]}>
<Text>borderEndStartRadius</Text>
</View>
<View style={[styles.box, styles.roundedEe]}>
<Text>borderStartEndRadius</Text>
</View>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#ffffff',
},
box: {
margin: 56,
height: 160,
width: 160,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#208AEF',
},
roundedEs: {
borderEndStartRadius: 44,
},
roundedEe: {
borderStartEndRadius: 44,
},
});
On IOS everything is ok, Android is broken
React Native Version
0.85
Affected Platforms
Runtime - Android
Output of npx @react-native-community/cli info
Stacktrace or Logs
MANDATORY Reproducer
https://snack.expo.dev/@istarkov/joyous-red-bacon?platform=android
Screenshots and Videos

Description
On Android, the logical border-radius props
borderEndStartRadiusandborderStartEndRadiusare mapped to the wrong physical corners.borderEndStartRadiusrenders at the top-right, but per the CSSspec (and iOS) it should be at the bottom-left. The two props are swapped. iOS maps them correctly.
Bug location
Android —
endStart/startEndare swapped in the LTR (and RTL) branches ofresolve():react-native/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/BorderRadiusStyle.kt
Lines 156 to 177 in 066c0d8
Steps to reproduce
On IOS everything is ok, Android is broken
React Native Version
0.85
Affected Platforms
Runtime - Android
Output of
npx @react-native-community/cli infoStacktrace or Logs
MANDATORY Reproducer
https://snack.expo.dev/@istarkov/joyous-red-bacon?platform=android
Screenshots and Videos