Skip to content

Conversation

@gpspake
Copy link
Contributor

@gpspake gpspake commented Jun 3, 2016

This commit removes a single line that was recently added that results in the following style:

.row .row {
  max-width: none
}

The line was added in response to #8304. However, the appropriate solution would have been to add the expanded class to nested rows. Setting max-width to none introduces a break. If a nested row needs to be full width, the expanded class can be applied to that row; however, if nested row max-width is set to none, there's no way to contain a row to the grid inside of an expanded row.

If a row is nested inside of an expanded row, it should be contained to the grid unless the expanded class is explicitly added to the nested row.

This fixes #8886

If a row is nested inside of an expanded row, it should be contained to the grid unless the expanded class is explicitly added to the nested row. 
If a nested row needs to be full width, the `expanded` class can be applied to that row; however, if nested row max-width is set to none, there's no way to contain a row to the grid inside of an expanded row.

This fixes foundation#8886
@gpspake
Copy link
Contributor Author

gpspake commented Jun 3, 2016

For further reference, here's how this has worked up until 6.2.1. The expanded class already sets max-width:none so applying it to all nested rows is too broad.

<div class="row expanded"> <!--Parent - Full width-->

    <div class="row"> <!--Nested - Contained to grid-->

    </div>

    <div class="row expanded"> <!--Nested - Full width-->

    </div>

</div>

@andycochran
Copy link
Contributor

👍 I agree; this commit was a mistake.

@andycochran
Copy link
Contributor

@gakimball, are you okay with reverting this and requiring .expanded to fix nested rows? Other ideas?

@rafibomb rafibomb added this to the 6.2.4 milestone Jul 12, 2016
@rafibomb
Copy link
Member

I'll take this one! I'll test it and see if it's the way to go.

@rafibomb rafibomb self-assigned this Jul 12, 2016
@jrock17
Copy link

jrock17 commented Aug 2, 2016

@rafibomb I think there is a related issue on the flex-grid. It's missing the margin-left and margin-right for nested rows inside an expanded row.

In _flex-grid.scss around line 165 I think you need to add the margin stuff for the nested row:

    // Expanded row
    &.expanded {
      max-width: none;

        .row {
            margin-left: auto;
            margin-right: auto;
        }
    }

@gpspake
Copy link
Contributor Author

gpspake commented Aug 12, 2016

Small little anecdote that doesn't really change anything here...
We added a temporary fix for this which explicitly adds a max-width back to .row .row
which we just realized overrides the nested expanded rules and prevents us from using nested expanded rows (since they're contained to the grid - even with the expanded class) :(
If we get rid of our temporary max-width rule, though, we're back to square one.
best bet is to undo that pesky one-liner

@kball kball merged commit 6b5dd7c into foundation:develop Sep 13, 2016
mt-deva added a commit to mt-deva/foundation-standalone-grid that referenced this pull request Sep 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expanded row children no longer contained to grid in Foundation 6.2.1

5 participants