-
Notifications
You must be signed in to change notification settings - Fork 14
Tips
You will get a random jank in the layout if you do so.
-
If you want a child to be 100% in a single direction, just have the parent layout in the cross dimension (e.g. a
verticallayout will automatically have its children100%width). -
If you want a child to be 100% in both dimensions, then use
verticalon parent andflexon the child to have it take up all available parent space.
Margins collapse, padding doesn't. If you want a maintainable layout don't be lazy and use margin, instead just wrap in a div
<div> <!-- use padding on this div -->
<!-- the content you want margined -->
</div>If you are curious here is a visual difference. Don't have something that completely ignores its height property. Also, inline doesn't work with CSS transforms.
You can use the styles csx.flexRoot + csx.center however it will eat up empty spans so you should combine with whiteSpace:'pre'.