Financial-Times / o-grid

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

Inclusion of a subset of the default selectors #29

Closed wheresrhys closed 9 years ago

wheresrhys commented 10 years ago

If e.g. you are using a 12 column grid but only ever want to split the page into 5 and 7 then it will only include the 5 and 7 width selectors

Proposed implementation

@mixin createGrid(
    ...
    $includeSizingSelectors: true, // true includes all from 1 to n, false includes no selectors, or a list of integers and/or 'S1' style selectors can be specified
// Possibly could also have additional syntax such as `1-` to mean 'include the selector for 1, but not s1, m1, l1, xl1'
) {
   // while iterating through from 1 to n do a check to see if the given selector should be included
}
kaelig commented 9 years ago

Good idea in principle.

But the boilerplate code for grids is quite small. I think this complicates the source for a small gain in output.