react / react/react-native

[iOS] Shadow styles are unexpectedly applied to elements in the subtree

Open
#33,969 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Impact: Bug Never gets stale Platform: iOS
Dominant language
C++
Stars
127k
Forks
25.3k
Avg merge
1d 23h
Merged PRs (30d)
4

Description

Description

Setting the iOS-only shadow* style props on a View can unexpectedly apply shadows to multiple elements in the view's subtree. This issue can be reproduced in Fabric too.

Version

0.68

Output of npx react-native info

...

Steps to reproduce
  1. Open: https://snack.expo.dev/MmY5VRLKN
  2. Select iOS preview
  3. Notice how the shadow applied to a wrapping view causes text elements to receive a shadow, and the background to be tinted the color of the shadow
Snack, code example, screenshot, or link to a repository

https://snack.expo.dev/MmY5VRLKN

image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Snack reproduction in an iOS preview and compare the behavior in Fabric. Trace how the iOS-only shadow props on the wrapping View affect its subtree; done means descendant text no longer receives the shadow and the background is not tinted by the shadow color.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.