Financial-Times / o-grid

Responsive grid system
http://registry.origami.ft.com/components/o-grid
93 stars 14 forks source link

Suppress gutters on nested grids #40

Closed manalishi79 closed 10 years ago

manalishi79 commented 10 years ago

Currently a nested element inherits some auto/default gutter on left and right.

This is not necessary, default should be no gutter with an option to turn on.

triblondon commented 10 years ago

Actually the gutter is necessary in many cases. Say you have a page split into two columns 8:4, and the 8 col is split into a 6:6. There needs to be a gap between the two 6-col blocks. If the 6:6 is right up against the inside of the parent 8-col container, it's true that you probably don't want the double gutter that that would cause, but we do remove those. You can see there's no double gutter on the registry demos, at least as of 2.1.5:

http://build.origami.ft.com/files/o-grid@2.1.5/demos/default.html

manalishi79 commented 10 years ago

Looking at that demo the the two nested 6 cols behave correctly i.e. no outer gutters only internal.

Is this automatic or do product devs have to specify no outer gutter?

If yes, can I rightly assume this suppressing of outer gutters applies to every nesting as you nest deeper.

triblondon commented 10 years ago

The outer margins are removed automatically.