Skip to content

Instantly share code, notes, and snippets.

@AdamHjerpe
Created September 11, 2013 18:19
Show Gist options
  • Select an option

  • Save AdamHjerpe/6527616 to your computer and use it in GitHub Desktop.

Select an option

Save AdamHjerpe/6527616 to your computer and use it in GitHub Desktop.
Making the base font-size reponsive
///////////////
// Variables //
///////////////
// Breakpoints
$break-small: 840px;
$break-large: 1024px;
////////////////
// Font-sizes //
////////////////
// Desktop font-size
$f-size: 16px;
// Tablet font-size
$f-size-m: 14px;
// Mobile font-size
$f-size-s: 12px;
body {
background: $bg-img; // Define this shiet!!!
color: $font-col; // Define this shiet!!!
font: {
family: $p-font; // Define this shiet!!!
size : $f-size;
weight: 400;}
letter-spacing: -0.05em;
line-height: $l-height;
@media screen and (max-width: $break-large) {
font-size: $f-size-m;}
@media screen and (max-width: $break-small) {
font-size: $f-size-s;}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment