-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Why does columns
have negative margin?
#766
Comments
columns
margin-bottom 0.75rem?columns
negative margin?
It's to keep the content aligned with the rest. You can try removing the padding, but it will cause issues when having columns inside a container, and "normal" content outside out of these columns. The green line is the edge of the container. If we remove the negative margins, the columns are offset (red line). |
The negative margin applied to columns actually (margin-top) leaves the same amount of space between the body and the html as the margin. This could be noticed if you set different background colors on both html and body. Is there any solution for that? |
Just FWIW this creates a dependency that I couldn't find anywhere in the docs: If you use .columns and you aren't inside a .section, the screen will horizontal scroll. I think it would be worth (a) documenting this, and potentially (b) changing the behavior to only put the negative margin on .section .columns -- so that it isn't there when you're not inside a .section. |
@jgthms .columns {
margin-left: 0;
margin-right: 0;
}
.columns > .column:first-child {
padding-left: 0;
}
.columns > .column:last-child {
padding-right: 0;
} Edit: Doesn't work with |
columns
negative margin?columns
have negative margin?
Hey, I've also noticed this very same issue. Currently, my solution to this is to manually set Any other good solution to this? |
Any news on this? |
I too just ran into this on a webpage using |
add class "is-marginless" if you don't want margins |
I am not a frontend guy and encountered this issue too. I came out at the same solution, but with multiline-flex it messes with the padding, since on mobile-widths each column gets its own row. |
You have the entire community saying this is an unusual way, and you still do it. Why? I think it's safe to say the default should be changed. I feel a lot of these "bug", not quite bugs are created by the author himself. Why? At least some workaround this? Do I need to put 'section' inside footer? Really? Or whatever? Just why. Yes, I've read the 'why', don't think its desired. A great framework, it is very nice, but these little things are like what the hell. |
I don't see the point of the vertical margins either. It causes divs with class 'columns' to overlap siblings. Can you elaborate on that? |
That correct, I also wants to know the rationale behind this. |
Is it possible to set "is-marginless" as a default option to columns? I don't see a point in these margins at all. |
Me neither, so do 99% of the community. You could change the codebase, see if that works. Then just remind yourself or write a "WARNING" on updating codebase do this: XYZ. I'd assume this change could break other things, but you could tell us how many things you had to fix by adding the "is-marginless" code to the columns or whatever. |
Many thanks for the "is-marginless" recommendation. I was stepping through my design, adding Having read this thread, I still don't understand why negative margins are required. 🤷 |
negative margins are required because each column has padding. The goal is to keep each column in the same place as it was, also to align columns when they wrap to the next line AND keep a gap between each other when on the same line |
I am having to use columns within a .section and then reset the $section-padding: 12px and this resolves. Very weird. |
I get |
Is it about Bulma or about the Docs?
Bulma
Is it a bug/feature/question or do you need help?
Question
Overview of the
**This is about the Bulma CSS framework
**I'm using Bulma version [0.4.1] -->
My browser is: Chrome linux latest
**I am sure this issue is not a duplicate
Description
Why are my
columns
always offset from its original place. I've created<header class='columns'></header>
and it went over top bound of documentSteps to Reproduce
columns
class and look on it via inspectorThe text was updated successfully, but these errors were encountered: