Financial-Times / o-grid

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

Fix gutterless, closes #134 #135

Closed triblondon closed 8 years ago

triblondon commented 8 years ago

image

image

kaelig commented 8 years ago

This unfortunately breaks sub grids.

My recommendation would be to have a modifier on containers, removing left and right padding.

Something like this:

    .o-grid-container--bleed {
        padding-left: 0;
        padding-right: 0;
    }
triblondon commented 8 years ago

@kaelig can you elaborate a bit on how it breaks subgrids?

OK, so the bleed idea would leave us with a solution where:

I'd be concerned about possible overflow scrollbars coming in, unless there was overflow hidden on the container. But if that's the only solution that works for all of us and it doesn't cause any side effects, fair enough.

kaelig commented 8 years ago

The body should have overflow-x: hidden on it. It's pretty common to do it on responsive sites to make sure no third party content gets out of the desired viewport and adds horizontal scrollable areas.

Subgrids are rows inside of cells, there are a few on the test page, but not for compact rows (yet). With the technique from this PR, I found that subgrids got out of their container. If that makes no sense I can throw a bit of code your way.

triblondon commented 8 years ago

OK, updated to use new approach. Also updated the demo to remove margin highlighting because it is misleading now that it goes outside the container and is in some cases negative.

triblondon commented 8 years ago

Still needs documenting, if Origami team are OK with this.

kaelig commented 8 years ago

Ideally there would be a new test for it too! I believe @wheresrhys knows well how they work.

wheresrhys commented 8 years ago

I'm happy to help with explaining the tests, but no time to write one I'm afraid

triblondon commented 8 years ago

OK, the test framework was pretty broken, actually. For example:

Also added documentation for bleed.

kaelig commented 8 years ago

Good stuff, thanks for doing this, it's good to see the grid evolve with sensible use cases!