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

[Grid] Fix flex-direction inheritance on column grid #2810

Closed
fstanis opened this issue Aug 7, 2015 · 2 comments
Closed

[Grid] Fix flex-direction inheritance on column grid #2810

fstanis opened this issue Aug 7, 2015 · 2 comments
Milestone

Comments

@fstanis
Copy link

fstanis commented Aug 7, 2015

Consider the following code:

<div class="ui two column wide middle aligned grid">
    <div class="column">
        <div class="ui two column wide grid">
            <div class="column">grid item</div>
            <div class="column">grid item</div>
        </div>
    </div>
    <div class="column">grid item</div>
</div>

Since there are two columns inside a column of a two column grid, one would expect to get three grid item blocks, where the third is as wide as the first two combined. However, in this specific case, this doesn't happen, and the two items in the nested grid appear one below the other.

I've created a fiddle to demonstrate this, as well as two examples where this doesn't happen - it only happens when the parent grid is middle aligned and when the nested grid has a given column width, i. e. two column wide.

@jlukic
Copy link
Member

jlukic commented Aug 8, 2015

This is a bug, caused by flex-direction: column being inherited on grid.
In this line.

It should read

.ui.grid > [class*="middle aligned"].column:not(.row):not(.grid) 

As a side note from your example, the keyword for column sizing is (x) column not (x) column wide. This doesn't affect the bugs appearance but is worth noting.
http://jsfiddle.net/ng49ebq1/

@jlukic jlukic added this to the 2.1 milestone Aug 8, 2015
@jlukic jlukic changed the title Nested grid inside middle aligned grid not showing properly [Grid] Fix flex-direction inheritance on column grid Aug 8, 2015
@jlukic
Copy link
Member

jlukic commented Aug 11, 2015

Fixed in 2.1

@jlukic jlukic closed this as completed Aug 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants