Throughout my stylesheets I have calls to span
, using Susy's mixins to control the widths of the numerous modules used across a site.
I now have a requirement to change the grid gutter width at a given breakpoint. Whereas with a traditional grid system like the one one used by Foundation, all I would need would be a media query like this (assuming I has used classes on the elements):
@include breakpoint($medium-up) {
.column, .columns
{
padding: 6rem;
}
}
I can't see how to do the same thing using Susy. All my grid styling is now provided through mixins, so I no longer have clear hooks to target the spans.
How can I switch gutter widths at a breakpoint without resorting to adding individual breakpoints for each place I've used span
?
From Susy's documentation it seems the answer is to add something like:
.example {
@include span(6);
@include susy-breakpoint($medium-up, $medium-up-layout) {
@include span(6);
}
}
But repeating this across all my modules seems like a lot of duplication.
Of course, this problem isn't limited to Susy. The same issues arise using Compas's Vertical Rhythm. As soon as the rhythm needs to change at a breakpoint, the only option is to explicitly declare the change in a breakpoint at each and every point vertical rhythm's functionality is used.
In both cases - horizontal layout and vertical rhythm, it seems that a layer of abstraction is needed to allow for centralised changes to propagate across modules and avoid proliferation of duplicated media queries.
To be clear, I'm in no way criticising either toolkit. Just looking for the best way to use them.