Skip to content

Box-shadow scales twice with transform scale #49134

Closed

Description

@LJNGDAHL

Description

When applying both a box-shadow and transform scale to a React Native View component, the box-shadow is incorrectly scaled by the transform value squared. This creates an unintended visual effect where the shadow appears larger than it should be.

Steps to reproduce

  1. Create a View component
  2. Apply a box-shadow style to the View
  3. Add a transform scale to the same View

React Native Version

0.76.6

Affected Platforms

Runtime - iOS

Output of npx react-native info

System:
  OS: macOS 15.1.1
  CPU: (12) arm64 Apple M3 Pro
  Memory: 848.84 MB / 36.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.13.1
    path: ~/.nvm/versions/node/v20.13.1/bin/node
  Yarn: Not Found
  npm:
    version: 10.8.1
    path: ~/.nvm/versions/node/v20.13.1/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.0
      - iOS 18.0
      - macOS 15.0
      - tvOS 18.0
      - visionOS 2.0
      - watchOS 11.0
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23339.11.2421.12700392
  Xcode:
    version: 16.0/16A242d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.14
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.1.3
    wanted: latest
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.6
    wanted: 0.76.6
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

(no crash)

Reproducer

https://snack.expo.dev/@katarina.ljungdahl/restless-green-apple?platform=ios

Screenshots and Videos

Box shadow scaling issue

Activity

  1. cortinico commented on Feb 4, 2025

    @cortinico
    Contributor
  2. NickGerleman commented on Feb 4, 2025

    @NickGerleman
    Contributor

    @joevilches is expert on iOS impl, but is on PTO right now. Could look at this later.

  3. joevilches commented on Feb 6, 2025

    @joevilches
    Contributor

    Back from PTO, will try and take a look this week. Thanks for the report!!

  4. joevilches commented on Feb 11, 2025

    @joevilches
    Contributor

    @LJNGDAHL this should be fixed now with the attached PR! lmk if that is not the case

  5. added
    Resolution: Fixed
    and removed on Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Resolution: Fixed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions