twbs/bootstrap

Switch to enable responsive typography

Closed this issue · 3 comments

Either I am missing something in the documentation or it would be nice to add a switch to variables to enable usage of responsive typography.

For now I suppose the developer should implement by him self and use the prepared size variables!

We already use rem units in v4. Isn't the rest just a matter of

@media (min-width: AAApx) {
  html { font-size: BBBpx }
}
@media (min-width: CCCpx) {
  html { font-size: DDDpx }
}

?
Or are you suggesting the addition of such media queries, or...?

I have implemented it this way, because the different base-sizes is already available in variables. So it seems easy to add a switch to improve easie of use.

html {
    font-size: $font-size-xs;
}

@include media-breakpoint-up(sm) {
    html {
        font-size: $font-size-sm;
    }
}

@include media-breakpoint-up(md) {
    html {
        font-size: $font-size-base;
    }
}

@include media-breakpoint-up(lg) {
    html {
        font-size: $font-size-lg;
    }    
}
mdo commented

Redeclaring the font-size for everyone doesn't make sense. I'm in favor of documenting how to do this, but we won't be adding it ourselves to Bootstrap's default setup.