new directive fxLayoutGutter
See original GitHub issueProposal
What is the summary of the proposal?
<md-card-content>
<div fxLayout="row wrap" fxLayoutGap="24px">
<md-input-container fxFlex="25%">
<input mdInput placeholder="Name">
</md-input-container>
<md-input-container fxFlex="25%">
<input mdInput placeholder="Occupation">
</md-input-container>
<md-input-container fxFlex="50%">
<input mdInput placeholder="Company">
</md-input-container>
</div>
</md-card-content>
fxLayoutGap adds this style:
margin-right: 24px;
In this case there will be a transition to a new line, but I would not like
Using css calc
is not convenient fxFlex="calc(50% - 24px)"
What is the proposal?
Create new directive fxLayoutGutter
~or update fxLayoutGap
~
If set to fxLayoutGutter="24px"
apply a style padding:
padding-left: 12px;
padding-right: 12px;
We divide the value of fxLayoutGutter / 2
and insert padding in the style
Is there anything else we should know?
This implementation is in ng-zorro grid
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Angular Flex Layout refuses to center container horizontally ...
The container within 'interactive-models' will simple not center inside his parent container. in App Component Html: <router-outlet fxLayout=" ...
Read more >angular/flex-layout - Gitter
hi guys, I found new directives on the flex layout wiki page starting with gd- I assume this is css grid layout, is...
Read more >Angular flex layout basics
Angular flex layout directives for flexbox containers. The following API or directives are used on flexbox container. fxLayout; fxLayoutGap; fxLayoutAlign ...
Read more >Responsive Angular | Brian F Love
The two possible values for the fxLayout directive is either row or column . The fxLayoutAlign directive specifies the alignment of the child ......
Read more >Create a responsive card grid in Angular using Flex Layout
We just need to add grid to our fxLayoutGap directive to tell flex layout this gap is meant for a grid with gutter....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m also think
fxLayoutGutter
is necessary.I’ll discuss this with @ThomasBurleson, but my direct impression is that we won’t be adding a new directive for this in the near future. If you’d like to add the functionality yourself, you can add a
StyleBuilder
forfxLayoutGap
that, for instance allows you to addgutter
to a value for this.E.g.
fxLayoutGap="24px gutter"