Financial-Times / o-grid

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

Overrides for max-width only works for extra large #43

Closed richard-still-ft closed 10 years ago

richard-still-ft commented 10 years ago

The documentation states "By overwriting the values of any of the $...width, $...break or $...gutter variables the width and spacing of the grid at any of the layout sizes can be decreased or increased as required"

But only $o-grid-extra-large-max-width has any affect, all of the other sizes actually have max-width: none set, so override the variables has no effect.

AlbertoElias commented 10 years ago

It seems you can only override other max widths when you set o-grid-is-fluid to false. Is that the expected behaviour @wheresrhys ?

wheresrhys commented 10 years ago

Definitely not expected behaviour. I do recall playing around with max-width implementation to fix some bug in some version of ie, so that might be the origin of that bug.

AlbertoElias commented 10 years ago

It was added here: https://github.com/Financial-Times/o-grid/commit/351f1cd3eaf531277f1118a96e536d2997e481f2 Supposedly to support a completely fluid grid. Could you explain what the behaviour should be and why please? Thanks :)

wheresrhys commented 10 years ago

That's a very early commit so it's probably never worked properly. I think it should be something like this

@if ($maxWidth) {
    .#{$gridRow} {
        @if ($isFluid) {
            max-width: $maxWidth;
        } else {
            width: $maxWidth
        }
    }
}