Created
May 8, 2012 23:03
-
-
Save NickTomlin/2640236 to your computer and use it in GitHub Desktop.
Scaling text-size with media queries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
font-size:@remSize; /* 16px/100% */ | |
} | |
/* general proportional styles */ | |
p { | |
font-size: 2em; // 32px @ max-width /* (text needs to *pop* ;) ) */ | |
line-height: 1.5; | |
margin:0 0 3em 0; | |
} | |
/* mobile and up cascading media queries */ | |
@media only screen and (min-width: 320px) { | |
html { | |
font-size:10px; | |
} | |
@media only screen and (min-width: 480px) { | |
html { | |
font-size: 11px; | |
} | |
} | |
/* etc etc */ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment