Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style property "boxShadow" doesn't support array of objects #2752

Open
1 task done
rosko opened this issue Jan 4, 2025 · 0 comments
Open
1 task done

Style property "boxShadow" doesn't support array of objects #2752

rosko opened this issue Jan 4, 2025 · 0 comments
Labels

Comments

@rosko
Copy link

rosko commented Jan 4, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Describe the issue

react-native allows the setting of boxShadow using an array of objects: https://reactnative.dev/blog/2024/10/23/release-0.76-new-architecture#boxshadow.

react-native-web supports only strings.

Expected behavior

react-native-web should support setting boxShadow as an array of objects. Like it already does for transform
(https://github.com/necolas/react-native-web/blob/0.19.13/packages/react-native-web/src/exports/StyleSheet/preprocess.js#L208-L212)

Steps to reproduce

Compare these two style properties:

    // boxShadow: '#ff0000 5px 5px 5px 10px inset',
    boxShadow: [{ offsetX: 5, offsetY: 5, color: '#ff0000', blurRadius:5, spreadDistance: 10, inset: true }]

Test case

https://snack.expo.dev/@rosko/boxshadow-as-array-vs-string

Additional comments

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant