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

fix(fxLayoutGap): consider fxLayoutWrap to apply gap logic #148

Merged
merged 1 commit into from
Feb 8, 2017

Conversation

ThomasBurleson
Copy link
Contributor

  • margin-right be used with fxLayout="row" fxLayoutWrap fxLayoutGap combinations
  • margin-bottom be used with fxLayout="column" fxLayoutWrap fxLayoutGap combinations

fixes #108

@ThomasBurleson
Copy link
Contributor Author

@here - merge after PR 145.

@ThomasBurleson
Copy link
Contributor Author

@d3viant0ne - please review.

@maxime1992
Copy link

maxime1992 commented Jan 31, 2017

@ThomasBurleson I tried your PR on my demo and it's great 😄

One thing tho, when elements are going to the next line (fxLayoutWrap), they don't have a margin-top.

I think it would be a good idea to apply the gap not only horizontally between elements but also vertically, don't you think ?

image
(green is OK, red should also have some gap)

@ThomasBurleson
Copy link
Contributor Author

@maxime1992 - the gap will only be applied along the main-axis.

I am also changing this PR to apply margin-right (layout=row) and margin-bottom (layout=column).

@maxime1992
Copy link

Ok I skipped that part, my bad.

If there's no fxLayoutWrap, it's a good idea.

On the contrary, when the fxLayoutWrap is set to wrap, devs will have to apply margins manually instead of simply using fxLayoutGap. So in this case I'm not so sure.

*  `margin-right` be used with `fxLayout="row" fxLayoutWrap fxLayoutGap` combinations
*  `margin-bottom` be used with `fxLayout="column" fxLayoutWrap fxLayoutGap` combinations

fixes #108.
@tinayuangao tinayuangao merged commit 9f7137e into master Feb 8, 2017
@ThomasBurleson ThomasBurleson deleted the wip/thomasb/fix-layout-gap-108 branch February 9, 2017 14:34
karlhaas pushed a commit to karlhaas/flex-layout that referenced this pull request May 3, 2017
…ons (angular#148)

*  `margin-right` be used with `fxLayout="row" fxLayoutWrap fxLayoutGap` combinations
*  `margin-bottom` be used with `fxLayout="column" fxLayoutWrap fxLayoutGap` combinations

fixes angular#108.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes pr: lgtm This PR has been approved by the reviewer pr: needs presubmit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fxLayout="row" fxLayoutWrap fxLayoutGap="10px" gives an offset starting at the 2nd line
4 participants