mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
a9780f9102
Summary: This PR adds native CSS parser for `backgroundImage` property. Currently, it supports linear-gradient and radial-gradient spec compliant CSS syntax. ## Changelog: [GENERAL] [ADDED] - background image native parser. <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests Pull Request resolved: https://github.com/facebook/react-native/pull/53609 Test Plan: - Replicated existing testcases from JS. Currently i've added CSS syntax testcases. Checkout `CSSBackgroundImageTest.cpp` ### Verify example screens in RNTester - Set `enableNativeCSSParsing` to true in `ReactNativeFeatureFlags.config.js` and run `yarn featureflags --update` - Rebuild the project and verify `LinearGradientExample` and `RadialGradientExample` screens on both platforms. ### Notes - Currently it is difficult to run CSS renderer tests. I made a custom cmake config to get it working, some steps would be helpful. - Right now the new CSS renderer seems to be only working on iOS. NickGerleman mentioned there is some WIP to get it working on android. So please test this PR on iOS. Reviewed By: mdvacca Differential Revision: D83341309 Pulled By: javache fbshipit-source-id: 91b88e3df164766c1f0021283697b1e5f9b44bfc