mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-17 04:32:26 +00:00
Add failing test for style resolving behavior
Less specific shorthand style properties are being applied instead of the more specific styles if there is another element also with one of the more specific styles. This is due to the common styles being pulled out as class names for de-duplication. Ref #2007 Close #2010
This commit is contained in:
committed by
Nicolas Gallagher
parent
04fbf5e5ce
commit
d05fa342d0
+10
@@ -77,6 +77,16 @@ describe('StyleSheet/createStyleResolver', () => {
|
||||
expect(styleResolver.resolve({ pointerEvents: 'box-none' })).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test.skip('long form style properties take precedence over shorthand properties', () => {
|
||||
const registeredStyle1 = ReactNativePropRegistry.register({ paddingHorizontal: '40px' });
|
||||
const inlineStyle1 = { padding: '8px', paddingHorizontal: '40px' };
|
||||
expect(styleResolver.resolve([registeredStyle1, inlineStyle1])).toMatchSnapshot();
|
||||
|
||||
const registeredStyle2 = ReactNativePropRegistry.register({ marginVertical: '40px' });
|
||||
const inlineStyle2 = { margin: '8px', marginVertical: '40px' };
|
||||
expect(styleResolver.resolve([registeredStyle2, inlineStyle2])).toMatchSnapshot();
|
||||
});
|
||||
|
||||
describe('sheet', () => {
|
||||
beforeEach(() => {
|
||||
ExecutionEnvironment.canUseDOM = false;
|
||||
|
||||
Reference in New Issue
Block a user