question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

new directive fxLayoutGutter

See original GitHub issue

Proposal

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:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
nzbincommented, Sep 4, 2019

I’m also think fxLayoutGutter is necessary.

3reactions
CaerusKarucommented, Jul 17, 2019

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 for fxLayoutGap that, for instance allows you to add gutter to a value for this.

E.g. fxLayoutGap="24px gutter"

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found