Me and a coworker went into an eternal discussion about what is the best way to use Neat Grid-Medias.
Consider the following approuch:
Approuch A:
.mydiv {
font-size: 14px;
@include grid-media($somegridvar) {
font-size: 18px;
}
}
Then, consider this:
Approuch B:
.mydiv {
font-size: 14px;
}
@include grid-media($somegridvar) {
.mydiv {
font-size: 18px;
}
}
Testing on Neat, both approuchs renders to the same result, which i will not put here because its obvious.
My question is: What do you prefer? There is a "better" approach suggested by ThoughtBot? There is a "better" approach suggested by someone? There is a reason to use one instead of other? Its just a matter of style? Someone have use both to provide an enriched life statement?
What we deduced till now:
In Approuch A, we will have several includes of Grid Media on our pages, making the code harder to read and more bloated. At the other side, all Grid Media will be centered in one single rule, and the same rule will not be repeated over the document for each Grid Media.
In Approuch B, we will have a single block of each grid-media for each breakpoint, resulting in a much shorter code, but also multiplying the places where the element classes appear.
Also, if this coworker is reading this, im looking forward to discover that my way was the better. (yes, i will not tell you which one)