Closed joebochill closed 5 months ago
The previous discussions and commits explain why there is no "fix" for this issue RNfWeb. What RNfWeb does today is what the browsers do. The bug is in React Native's non-standard implementation of flexbox, which the RN team is working to align with W3C standards.
Is there an existing issue for this?
Describe the issue
When using
flex:0
in a React Native component, the translated styles in the web apply aflexBasis: 0%
which causes elements to not respect their intrinsic size.Refer to these related issues:
This PR looks like it would have fixed the issue, but it was never merged: https://github.com/necolas/react-native-web/pull/1265
Expected behavior
To match RN behavior,
flex:0
should map toflex: 0 0 auto
, or at least flexBasis should be 'auto'.Steps to reproduce
flex:0
view with a fixed height inside of a flex container. Observe that the element is collapsed down to 0 height (instead of it's specified height) and is invisible.Test case
https://codesandbox.io/p/sandbox/funny-goldstine-9tqmq9?file=%2Fsrc%2FApp.js%3A7%2C38
Additional comments
No response