Skip to content

Instantly share code, notes, and snippets.

@shirotech
Last active August 29, 2015 14:25
Show Gist options
  • Save shirotech/7a564757f38b37beccdf to your computer and use it in GitHub Desktop.
Save shirotech/7a564757f38b37beccdf to your computer and use it in GitHub Desktop.
Bootstrap responsive headers (h1, h2, h3, h4, h5, h6)
body {
.headers(@i, @diff) when (@i > 0) {
h@{i} {
@font-size: "font-size-h@{i}";
font-size: @@font-size - @diff;
}
.headers(@i - 1, @diff);
}
@media (max-width: @screen-xs-max) {
.headers(6, 6);
}
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
.headers(6, 4);
}
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
.headers(6, 2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment