-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Bug, feature request, or proposal:
md-toolbar
projects content to an internal md-toolbar-row
container and uses FlexBox css to layout in 'row' directions for that container. This means that custom CSS must be used to modify the direction to 'column'.
To achieve something like this is a challenge:
And using the pending Layout API does not work:
<md-toolbar fx-layout="column">
<div fx-layout="row" fx-layout-align="start center"> Title and buttons here </div>
<div fx-flex="15px"> simulate a gap </div>
<div fx-layout="column"> 2 lines of text organized vertically </div>
</md-toolbar>
By default this will layout each child div in a single row instead of the requested column flow direction.
An option for the developer is to use custom CSS:
md-toolbar .md-toolbar-layout md-toolbar-row {
flex-direction: column;
align-content: flex-start;
align-items: flex-start;
min-height: 120px;
}
But this ^^ option is not intuitive and seems to violate the entire idea of the Layout API.
Another solution - of course - is that the developer can add a protection wrapper:
<md-toolbar>
<div fx-layout="column">
<div fx-layout="row" fx-layout-align="start center"> Title and buttons here </div>
<div fx-flex="15px"> simulate a gap </div>
<div fx-layout="column"> 2 lines of text organized vertically </div>
<div>
</md-toolbar>
but ^^ solution is dirty and adds complexity.
What are the steps to reproduce?
-
See source Source to Flex-Layout Demo
-
See live demo Flex-Layout Demos
What is the use-case or motivation for changing an existing behavior?
I propose that all Layout APIs be transcluded to the md-toolbar-row
element. This way the developer's original intent is preserved without additional workarounds or hacks.