0.11.0
This release includes: a refactor of StyleSheet internals to improve browser layout times; improved compatibility with React Native; reduced bundle sizes in worse-case-scenario; and improved text truncation capabilities in supporting browsers.
Breaking changes
- CSS output has changed to better optimize browser layout times (9f860b8 and d4417e9)
- Remove
export defaultfrom the ESM entry point, to help with tree-shaking (69bd0f6) - Remove
ARTfrom the exports to reduce CJS bundle size (3d3ea9a) - Remove
resizeModestatic fromImage(49edcb2) - Replace
outlinewithoutline{Color,Style,Width}styles (f048d84) - Replace
animationNamewithanimationKeyframesstyle prop.
Deprecations
- The
classNameprop onViewandTextis deprecated and will be removed shortly (d50f630)
New features
- Add
TextInputsupport foronContentSizeChange, by @awinograd (67979b7) - Add
Textsupport fornumberOfLinesprop value greater than1. Only supported in WebKit and Blink browsers; limited localization support (f048d84)
Fixes
- Organize unimplemented modules in directories to help reduce CJS build size, by @EvanBacon (2a418be)
- Fix the
NativeEventEmitterimplementation, by @EvanBacon (9ce2b5b) - Allow text shadow to be set if only a
textShadowBlurandtextShadowColorare provided, by @skahack (cf7b020) - Fix animation style prop types.
- Fix use of
maxWidthwithTextusingnumberOfLinesprop. - Passing
nullvalues for style props now produces improved compatibility with React Native rendering.
Appendix
- StyleSheet refactor reduces browser layout times up to 30% in the stress tests.
- StyleSheet refactor reduces HTML payload size for SRR, e.g., the size of the HTML produced by the Twitter PWA's home timeline screen is reduced from 25.56 KB to 21.35 KB (-16%) gzipped.