[iOS] Strange gradient appears when using `borderTopLeftRadius` (or similar) inside a scaled `View`
Nessuno ha ancora preso questa issue.
- Lingua principale
- C++
- Stelle
- 127k
- Fork
- 25.3k
- Merge medio
- 1g 23h
- PR unite (30g)
- 4
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con la riproduzione Snack collegata ed eseguila su un dispositivo o simulatore iOS usando React Native 0.76.7. Confronta la View esterna ridimensionata e la View interna con borderTopLeftRadius; il lavoro è completato quando la forma interessata non mostra più gradienti assenti dal suo style.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- ios, react-native
- Ambito
- mobile
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100