Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fxLayoutGap="10px 20px grid" - alternative axis value and grid not working? #1411

Open
fredjohnd opened this issue Jun 18, 2022 · 1 comment

Comments

@fredjohnd
Copy link

fredjohnd commented Jun 18, 2022

Bug Report

What is the expected behavior?

According to the API of fxLayoutGap it mentions one can append "grid" to the fxLayoutGap value eg. "10px grid" and this merged PR #1234 gives the ability to specify a gap for the opposite axis as well eg. fxLayoutGap="10px 20px grid".

What is the current behavior?

The current behavior is that it does not seem to work. I only get the 10px gap on x axis and no gap vertically.

What are the steps to reproduce?

https://stackblitz.com/edit/fxlayoutgap-grid?file=src%2Fapp%2Fapp.component.html

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

I'm using the latest Angular 14 and Flex Layout

Is there anything else we should know?

In addition to not being able to get it to work, Is the documentation out of date? It does not mention the 2 axis values for fxLayoutGap.

@stephendeo
Copy link

You can fix this by doing the following. Just by wrapping your child elements with a fxFlex directive it should work.

<div fxLayout="row wrap" fxLayoutGap="20px grid">
  <div fxFlex>
  <span>Child Element</span>
  </div>
</div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants