react-native-web
react-native-web copied to clipboard
Remove 'normalize-css-color' from 'react-native-web'
Is there an existing request?
- [x] I have searched for this request
Describe the feature request
Look into removing the dependency on 'normalize-css-color' to help reduce bundle size and runtime cost of color processing. Consequences:
- React Native for Web will only support CSS colors.
- Cross-platform apps will need to migrate any unsupported color values to CSS colors.
- React Native for Web will not deduplicate the same color defined using different syntax, e.g.,
rgba(255,0,0,1)
andrgb(255,0,0)
. This might slightly increase the size of generated CSS files.
In the longer-term, build-time generation of CSS can support color value normalization / deduplication. But for client-side purposes, the normalization code is non-essential overhead.
It looks like this was removed in 0.19.6. Sadly this has broken at least one other project that was expecting normalise-css-color
to be present: https://github.com/GeekyAnts/NativeBase/issues/5772
Of course, the library in question should have its own dependency on this package, but I guess this will cause issues for people using RNW with NativeBase (which I'd guess is a decent few) who are upgrading from 0.18 -> latest (as I have just been).
I don't know how many times it has to be said that packages should not depend on private modules inside other packages