-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flex
gets converted to flex-grow
#426
Comments
They are equivalent |
React Native's |
I tried the calculator with this done in Kyle Bank's tutorial (code). Works fine otherwise but the flex is converted to flex-grow which causes the InputButton components to align ugly: Changing the CSS rule (manually on the browser dev tools) to Could this behaviour be fixed? |
As you can see in the screenshot, the only difference is the value of |
But why is the |
@maszaa This library is simply following the react-native API for flexbox To quote their docs:
|
But doesn't
actually mean the same thing as React Native has |
react-native-web/src/apis/StyleSheet/createReactDOMStyle.js Lines 155 to 160 in cdf13b8
|
My bad. What about setting that to 0? At least worked for the calculator when I manually set all the flex components to have |
Looks like maybe we should do that. I'll investigate a bit more |
Thanks for the fix! Unfortunately my |
The problem is even though |
In react-native-electron I had a bug that a text element would take up full height in production but in development it would only be the height of the text like it shoud. Thanks to this discussion, I was able to solve it with:
|
What is the current behavior?
When I use
flex: 3
in a component'sstyle
prop, it gets converted toflex-grow: 3
in the DOM.What is the expected behaviour?
flex: 3
in react-native-web should appear asflex: 3
in the DOM, notflex-grow
.Environment (include versions)
React Native for Web (version):
^0.0.81
The text was updated successfully, but these errors were encountered: