-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add Align::Fill variant #1044
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
Add Align::Fill variant #1044
Conversation
7631c70
to
eb09295
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! 🥳
It's really nice that we can extend the layout engine so easily with just an additional variant! 🎉
I left a couple of suggestions. Let me know what you think!
Thanks, @hecrj! Agreed, a surprisingly easy change for a big layout improvement. One last question before we merge... I'm having a harder time reasoning about the potential impact of this change on |
@tarkah I think the changes in |
b4998d3
to
a0ad399
Compare
I have rebased and refactored the alignment types by moving them into a new Also, I have changed the |
Add Align::Fill variant
Adds a new
Align::Fill
variant that works similar toalign-items: stretch;
.Currently, it's impossible to have all child elements of a row or column "fill" the remaining space based on the largest sized child. This makes using widgets like
Rule
impossible when nested inside a row or column that has no fixed size.Here's an example of how it's possible to use
Rule
in thepokedex
example, where it's height now stretches to fill the dynamic height of the row it's in. WithoutAlign::Fill
, theRule
expands to fill the entire viewport.Before:
After:
Closes #746