Repository navigation
Commit 3e43488
committed
fix(native): combine a style prop's class, inline and !important values in one step
deepMergeConfig combined a style prop's values in two passes and three
places, so the two spellings of a target combined an inline value
differently, an !important class over a target other than style replaced
the inline value and the class's own declarations, and an inline style
was copied before it reached the component.
combineStyleLayers combines the class's value, the element's inline value
and the class's !important value in the cascade's order, for every
target whichever way the mapping spells it, through every object on its
path; the inline value is a layer of its own, never copied, and a
callback style composes with the others. Every other prop a config
computes takes the element's value over the class's and the !important
value over both, as a target:false config's props do.
filterCssVariables returns a value it removes nothing from as it came and
reads only data properties, so an inline style, an Animated.Value in it
and a Reanimated animated style reach the component as they were.1 parent e9eeb19 commit 3e43488
4 files changed
Lines changed: 807 additions & 215 deletions
File tree
- src
- __tests__/native
- native/styles
0 commit comments