Repository navigation
Release 4.0.0-rc.1
Pre-release
Pre-release
This is the react-native-css 4.0.0-rc.1 release candidate. It targets Expo SDK 58: Expo 58.1.0, React Native 0.88.1, React 19.3.0, Reanimated 4.7.1 and Worklets 0.13.0. It re-exports AssetRegistry from the components shim, which expo-asset and expo-font need on React Native 0.88.
npm install --save-exact react-native-css@4.0.0-rc.1The rc tag points to this candidate. The stable latest tag stays on 3.0.7. The major version moves to 4 because of the breaking changes below, listed in #588.
Breaking Changes
@propertyvariables registered withinherits: falseno longer pass to children (#567)- Transforms (
translate-*,rotate-*,scale-*,skew-*,transform-*) are combined in the order browsers use (#576) py-*andpx-*outputpaddingVerticalandpaddingHorizontal(#580)placeholder:andselection:no longer depend on className order (#432)- Hex colors clip rather than gamut map, matching browsers (#457)
--x: initialoverrides another rule's or the parent's value, sovia-noneand*-initialwork with variants (#585)- Lists read through
var()keep their commas (#575) - Class, inline and
!importantstyles layer as in browsers, andPressablecallback styles combine with class styles (#578) styled()throws a named error for a non objectmapping, and skips an undefinednativeStyleMappingentry (#568, #418)
Features
- native: honour
inherits: falseon registered custom properties (#567) - native: evaluate
prefers-reduced-motion, somotion-reduceandmotion-safework on native (#591)
Bug Fixes
- compiler: scope single definition variable inlining to the declaring block (#592)
- native: re-export
AssetRegistryfrom the components shim (#504) - native: keep a list's separator when read through variables (#575)
- native: resolve and cascade transform properties as browsers do (#576)
- native: keep class, inline and
!importantstyles as layers (#578) - compiler: omit absent color-mix weights from serialized descriptors (#579)
- compiler: compile
padding-blockandpadding-inlinetopaddingVerticalandpaddingHorizontal(#580) - compiler: land
border-xandborder-ycolors on border keys React Native draws (#581) - native: apply
classNameonSafeAreaViewfrom the safe-area-context shim (#468) - native: rank an unset specificity slot the same however it is spelled (#432)
- types: accept an explicit
undefinedwherever a consumer writes an optional member (#418) - native: re-run an effect a batch notifies twice, and release a style entry by identity (#436)
- native: register color spaces for color-mix and clip out of sRGB colors (#457)
- native: share reactivity state across a dual package split (#427)
- let a custom property set to
initialoverride other declarations (#585) - type-check color scheme writes on every react-native in the peer range (#586)
Performance
- key the style cache by a unique hash (#568)
- return nothing from compiler visitors that only read (#490)
Thanks to @sammoore, @YevheniiKotyrlo, @Wadiou, @kdwkr, @Peek-A-Booo, @NateIsern and @nimbly1 for these changes.
Full changes: 3.1.0-rc.1...5755630