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

Can grid be configured to use margins rather than padding for gutters #7267

Closed
alexmorris opened this issue Nov 27, 2015 · 4 comments
Closed

Comments

@alexmorris
Copy link

Feature request.

@Renkas
Copy link
Contributor

Renkas commented Nov 27, 2015

Can't see really how. box-sizing: border-box; or any other property wont include margins.

@alexmorris
Copy link
Author

Can maybe use calc to adjust widths to remove margins from computed width

@Renkas
Copy link
Contributor

Renkas commented Nov 28, 2015

I don't think that could be reliably done.

This would also add the problem that you could not change margins on the fly - as you can right now with the paddings.

Actually i really can't see any real world use case for that right now. Is there actually?

@gakimball
Copy link
Contributor

We considered a margin/calc grid, but decided to keep our padding based grid. The math is way easier, and it also makes it easier to keep the width of the column and the size of its gutters separate. This is important because we plan to introduce a responsive gutter feature in 6.1.

The main downside is that you can't combine columns with other components for less markup, but we don't consider this a huge deal. On the contrary, keeping layout elements and other components separate makes more sense to us.

<div class="row">
  <!-- Column component -->
  <div class="column">
    <!-- Callout component -->
    <div class="callout">
    </div>
  </div>
</div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants