-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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] New Grid System Negative Margins #8611
Comments
This issues occurs when I use a v-row inside a v-col. Does the v-row ALWAYS need to be inside a v-container? Can't I use v-row inside a v-col for example? Thanks! |
I'm not sure that there have any use case for using Actually, the point of negative margin in For my advice, I recommend you to use <v-row>
<v-col>
<span>
testing stuff
</span>
</v-col>
</v-row> Hope that it would be help 😎 |
Thanks, But, even if I wrap the contents of a v-row in a v-col, the same issues remain. For example: <v-col md="9">
<v-row justify="center">
<v-col class="shrink">
/* Button. Other Content.*/
</v-col>
</v-row>
</v-col> Do I need to wrap the v-row in a v-container? It can't be the direct child of the v-col? Thanks again! |
@VeronicaGavrila |
Hey, @runyasak In the previous example all of the v-cols are wrapped in a v-row but I still get negative margins and overflowing x axis. I can fix it if I add a v-container, and the full code hierarchy will be something like this: <v-app>
<v-content>
<v-container>
<v-row>
<v-col>
<v-row>
<v-col>
<--! We are here-->
<v-row>
<v-col>
</v-col>
</v-row>
</v-col>
</v-row>
<v-col>
</v-row>
</v-container>
</v-content>
</v-app> Is something wrong with the above code that it needs the v-container? If I do not put a v-container where the "We are here" comment is, I will have a negative margin and overflow on X. Thanks again! |
Okay so the issue is not from the way I nested the grid elements but from the additional padding that I added to the last v-col. |
For You can read more information from here, Grids usage - Vuetify |
Hmm - I'm having the same problem. "Grids usage" is not very helpfull at all but in this special case the "Grids usage" page use most of the time "no-gutter" which sets margin-left to 0. Here you can see that margin-left is negative by default... |
Just a point to shout back to here. This is being done all over the Vuetify docs where row is used with no internal column. Here is a recent example I just tripped over.
|
This is still a problem. -12px margins on all sides of rows, causing weird mobile horizontal scroll behavior. |
The most straightforward workaround I've found so far is to use ETA: I ended up using padding everywhere, e.g.
|
I'm exploring replacing this with |
Environment
Vuetify Version: 2.0.7
Vue Version: 2.6.10
Browsers: Chrome 76.0.3809.100
OS: Windows 10
Steps to reproduce
Using v-row creates a negative right margin that causes overflows / horizontal scrolling on mobile.
Is there any solution to get rid of this instead of adding ma-0 to every row? Is this the expected functionality?
Thank you!
Expected Behavior
Should not cause any problems with overflow / horizontal scrolling.
Actual Behavior
Causes issues with overflows / horizontal scrolling, especially on mobile.
Reproduction Link
https://codepen.io/VeronicaGavrila/pen/mdbEQLM
The text was updated successfully, but these errors were encountered: