-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
How-to: make a square view #184
Comments
Not possible in a single render pass right now :( One trick in CSS to do that is
but it's super ugly :( I've been prototyping implementing |
Good to know. Thanks for the fast answer @vjeux. |
Summary: Added an experimental feature to allow to use only rounded values. See #184. It's not a perfect solution and definitely can be further improved. I'm looking forward to your ideas. Closes facebook/yoga#256 Reviewed By: splhack Differential Revision: D4214168 Pulled By: emilsjolander fbshipit-source-id: 6293352d479b7b4dad258eb3f9e0afaa11cf7236
Summary: Added an experimental feature to allow to use only rounded values. See facebook#184. It's not a perfect solution and definitely can be further improved. I'm looking forward to your ideas. Closes facebook/yoga#256 Reviewed By: splhack Differential Revision: D4214168 Pulled By: emilsjolander fbshipit-source-id: 6293352d479b7b4dad258eb3f9e0afaa11cf7236
What about Setting it to |
I was trying to make a square view where width=100% and height=width. The approach I'm taking is to measure the parent view in
componentDidMount
and use its dimensions to manually set the size of the square view, one render frame later. This seems reasonable and mostly good but I want to know if I'm overlooking a way to do this in a single render pass.The text was updated successfully, but these errors were encountered: