[iOS] Strange gradient appears when using `borderTopLeftRadius` (or similar) inside a scaled `View`
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 127k
- Forks
- 25.3k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 4
Description
Description
See snack reproduction: https://snack.expo.dev/@whiteroseeducation/ios-bordertopleftradius-gradient-issue
The issue only appears on iOS devices.
When two conditions are met, you see weird gradients near the corners. These conditions are:
- The
Viewhas style which sets the border corners to different radius values, e.g. withborderTopLeftRadius. - The
Viewis nested in aViewwhich has a shrinking scale transform.
E.g.
<View
style={{
width: 400,
height: 400,
transform: [{ scale: 0.5 }],
}}>
<View
style={{
width: '100%',
height: '100%',
backgroundColor: 'white',
borderColor: 'navy',
borderWidth: 8,
borderTopLeftRadius: 40,
}}
/>
</View>
Steps to reproduce
- Click snack link above
- Run on an iOS device or simulator
- Observe that the first shape (labelled "The issue") has weird gradients in it, which aren't specified by its style
React Native Version
0.76.7
Affected Platforms
Runtime - iOS
Reproducer
https://snack.expo.dev/@whiteroseeducation/ios-bordertopleftradius-gradient-issue
Screenshots and Videos
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Snack reproduction and run it on an iOS device or simulator using React Native 0.76.7. Compare the scaled outer View and the inner View with borderTopLeftRadius; done means the affected shape no longer shows gradients that are absent from its style.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100