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

fxLayout="row-reverse" not rendering correctly when nested inside a fxLayout="row" #78

Closed
adrian-heath opened this issue Dec 31, 2016 · 8 comments
Labels

Comments

@adrian-heath
Copy link

adrian-heath commented Dec 31, 2016

The use of row-reverse is not being rendered correctly as shown in the below HTML for the nested flex container which shows flex-direction:row.

  • Browser is Chrome,
  • flex-layout v2.0.0-beta.1.

Changing the outer container to also be row-reverse still doesn't correct the inner containers direction.

<div _ngcontent-gew-112="" 
        class="flex-container bottom-margin" 
        fxlayout="row-reverse" 
        fxlayoutalign="center center" 
        ng-reflect-layout="row-reverse" 
        ng-reflect-align="center center" 
        style="box-sizing: border-box; 
                    max-height: 100%; 
                    display: flex; 
                    flex-direction: row; 
                    justify-content: center; 
                    align-items: center; 
                    align-content: center;">
@ThomasBurleson
Copy link
Contributor

ThomasBurleson commented Dec 31, 2016

Issues are considered invalid without a working Plunkr or CodePen demo.


Also here are some important guidelines for investigating a Layout issue:

  • The Layout API is case-sensitive
    • fxlayout is not valid
    • fxLayout is valid
  • If you cannot get Flex-Layout to work with an example, try to manually use CSS flexbox stylings. If that still does not work to achieve your goals, then Flex-Layout is not the issue.
  • If hand-crafted CSS resolves the issue, but Flex-Layout does not then we definitely have a bug in this repository.

Templates

@adrian-heath
Copy link
Author

Here is a Plunkr

https://plnkr.co/edit/JcQRiKbeU0uB3m91RMHo?p=preview

The inner layout is set to row-reverse but always shows as row irrespecitive of the outer containers layout

@ThomasBurleson
Copy link
Contributor

ThomasBurleson commented Jan 1, 2017

@adrian-heath - This is a great Plnkr. Thank you very much!


You will laugh > the issue is simple and easy to stumble into. Your version is using binding to expression that is actually a static text value:

Yours:

<div [fxLayout]="row-reverse" class="colored box" >

Corrected

<div fxLayout="row-reverse" class="colored box" >

screen shot 2017-01-01 at 10 02 08 am

@ThomasBurleson
Copy link
Contributor

Closing as not-an-issue.

@joshwiens
Copy link
Contributor

I've done that more than once myself.

@ThomasBurleson
Copy link
Contributor

Me too!

@adrian-heath
Copy link
Author

Turns out whilst I thought I had recreated as it was in my code, I'd missed something which does break row-reverse. I added fxLayoutAlign="center center" to the inner container and row-reverse was broken again. I'll create a separate issue since this one is now closed

@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 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants