Add boxShadow support for modern React Native styling#30
Add boxShadow support for modern React Native styling#30fireinnti wants to merge 1 commit intozeplin:mainfrom
Conversation
Co-authored-by: Copilot <copilot@github.com>
| generateBoxShadowStyleObject(layer.shadows, layerType, context) | ||
| ); | ||
|
|
||
| // Legacy shadow props need multiple layers. Box shadow can do all of them in one, but we want to keep the old ones for backwards compatibility |
There was a problem hiding this comment.
Should the legacy shadow properties come before, so that modern one takes precendence?
There was a problem hiding this comment.
My understanding is that this would have both showing. Do you think having one above the other would be better? I think that makes sense, but just making sure I'm tracking.
There was a problem hiding this comment.
Showing both in the code output is OK. I first assumed shadows in React Native would work like how CSS properties work for standardized and vendor prefixed proprerties (i.e. the last written one takes precedence). However, if the system prioritizes the modern one over the legacy one no matter in which order they're written, this should be fine too.
I guess it wouldn't hurt to output the modern one below the legacy one though, your call. Just let me know, and we can merge it afterwards.
There was a problem hiding this comment.
I think I prefer the modern at the bottom, as the shadow box adds multiple properties, while the box shadow adds just one. So it's easier to glance at. Ultimately, I doubt it matters too much, so I'm down for the merge. Thanks for your input
Change description
Type of change
Related issues
Checklists
Development
Security
Code review