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

[Bug Report] grid-list affects nested flex items when it should only affect the top most layer flex items #6233

Closed
austinpe opened this issue Jan 23, 2019 · 1 comment
Labels
duplicate The issue has already been reported

Comments

@austinpe
Copy link

Versions and Environment

Vuetify: 1.4.3
Vue: 2.5.22
Browsers: Chrome 71.0.3578.98
OS: Windows 10

Steps to reproduce

Make a v-layout with a grid-list prop that contains flex items with nested flex items

Expected Behavior

The gutter should only impact the top level flex items (as in .flex items that are direct children of the .layout item that is a direct child of the .container item), not the nested flex items

Actual Behavior

The grid-list functionality adds padding and margin to nested flex items as well as the direct child flex items

Reproduction Link

https://codepen.io/austinpe/pen/LqELMr

Other comments

In the codepen, I put the css from the /components/_grid.styl and used red borders to show that it was targeting nested flex items.

Then, I made a "custom" class with green borders that shows how this could be fixed using the ">" css selector so that only the top most level flex items are targeted.

Basically:
The styl should read:

.container
  &.grid-list
    for $size, $gutter in $grid-gutters
      &-{$size}
        > .layout
          > .flex
            padding: ($gutter / 2)

not:

.container
  &.grid-list
    for $size, $gutter in $grid-gutters
      &-{$size}
         .layout
           .flex
            padding: ($gutter / 2)
@johnleider
Copy link
Member

This is something @Phlow2001 tried to fix in the past but I was too stubborn. It's on the radar and will be resolved as part of 2.0.

Duplicate of #6020

@johnleider johnleider added the duplicate The issue has already been reported label Jan 23, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate The issue has already been reported
Projects
None yet
Development

No branches or pull requests

2 participants