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 should consider hidden elements #136

Closed
myrddraall opened this issue Jan 26, 2017 · 5 comments · Fixed by #145
Closed

fxLayoutGap should consider hidden elements #136

myrddraall opened this issue Jan 26, 2017 · 5 comments · Fixed by #145
Assignees
Labels
bug has pr A PR has been created to address this issue P2 Issue that is important to resolve as soon as possible
Milestone

Comments

@myrddraall
Copy link

myrddraall commented Jan 26, 2017

When an item in a layout is hidden (usually conditionally) then fxLayoutGap should not apply a gap to the first displayed element

<style>
   .col1{
    display:none !important;
  }
</style>
<div class="container" fxLayout="row" fxLayoutGap="16px">
  <div fxFlex class="col1">Div 1</div>
  <div fxFlex class="col2">Div 2</div>
  <div fxFlex class="col3">Div 3</div>
</div>

In this example Div 2 should not have a gap in front of it.

ThomasBurleson added a commit that referenced this issue Jan 30, 2017
fxLayoutGap should consider (and skip) hidden elements when applying layout-gap logic.

fixes #136.
@ThomasBurleson ThomasBurleson added bug has pr A PR has been created to address this issue labels Jan 30, 2017
@ThomasBurleson ThomasBurleson added this to the v2.0.0-beta.5 milestone Jan 30, 2017
@ThomasBurleson ThomasBurleson self-assigned this Jan 30, 2017
ThomasBurleson added a commit that referenced this issue Jan 30, 2017
fxLayoutGap should consider (and skip) hidden elements when applying layout-gap logic.

fixes #136.
@ThomasBurleson ThomasBurleson added the P2 Issue that is important to resolve as soon as possible label Jan 30, 2017
ThomasBurleson added a commit that referenced this issue Jan 31, 2017
fxLayoutGap should consider (and skip) hidden elements when applying layout-gap logic.

fixes #136.
@kara kara closed this as completed in #145 Feb 2, 2017
kara pushed a commit that referenced this issue Feb 2, 2017
karlhaas pushed a commit to karlhaas/flex-layout that referenced this issue May 3, 2017
@therafi
Copy link

therafi commented Oct 2, 2017

Part of this issue is still present with this in 2.0.0-beta.9
If there is a conditional fxHide on Div 3 (from the example), when Div 3 is hidden, then Div 2's margin-right (correponding to fxLayoutGap) should collapse.

For example, with the following code, if the page loads as small, then we expand, there will be no gap between 2 and 3. If the page loads as big, then we shrink it, there will be an excess gap after 2.

<div class="containerX">
  <div fxLayout="row" class="colored box nopad" fxLayoutGap="75px">
    <div fxFlex>            [flex 1]              </div>
    <div fxFlex>            [flex 2]              </div>
    <div fxFlex fxHide.lt-md>            [flex 3]              </div>    
  </div>          
</div>

Plunker

Tested on Chrome 61.0.3163

@darkbasic
Copy link

if the page loads as small, then we expand, there will be no gap between 2 and 3. If the page loads as big, then we shrink it, there will be an excess gap after 2.

I confirm, please reopen.

@CaerusKaru
Copy link
Member

@darkbasic This is being considered as part of #606 and will not be reopened separately

@darkbasic
Copy link

No need to reopen if it's tracked somewhere else. Thanks.

@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
bug has pr A PR has been created to address this issue P2 Issue that is important to resolve as soon as possible
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants