Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
Fix a few issues with some of the examples:
Root UI nodes have an implicit parent with
FlexDirection::Row
andAlignItems::Stretch
set. Only a width constraint is needed to fill the viewport. Specifyingheight: Val::Percent(100.)
is unnecessary and can cause confusing overflow behaviour.The default for position and size constraint properties is
Val::Auto
. Settingleft: Val::Auto
,max_height: Val::Auto
, etc does nothing.Solution
Delete those lines. There should be no observable differences in the behaviours of any of the examples.
Also changed a padding setting in the
flex_layout
example to use theaxes
helper function.