2 ms·
The example in the article narrowly avoids a very common use case that's one of the reasons I enjoy bootstrap - it lets you address multiple width cases in the
by RickS 12y ago
The example in the article narrowly avoids a very common use case that's one of the reasons I enjoy bootstrap - it lets you address multiple width cases in the same line.
EG, if I want a content area that adapts to phone/tablet/desktop, Bootstrap makes it as easy as
div class="col-xs-12 col-md-8 col-lg-6"
in bourbon/neat it would look more like
div.class {
@include media($mobile) {
@include span-columns(6);
}
@include media($tablet) {
@include span-columns(8);
}
@include media($desktop) {
@include span-columns(12);
}
}
I certainly concede that the latter makes more sense from a code-cleanliness standpoint, since it keeps the styling in the stylesheet.
However, for designing in the browser / mashing stuff out quickly, I find myself gravitating towards bootstrap because it makes prototyping really fast, even if it slightly violates the "don't style in the structure" rule