-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
How-to: make a square view #184
Labels
Resolution: Locked
This issue was locked by the bot.
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. |
facebook-github-bot
pushed a commit
that referenced
this issue
Nov 22, 2016
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
DanielMSchmidt
pushed a commit
to DanielMSchmidt/react-native
that referenced
this issue
Jan 4, 2017
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 |
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
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: