Skip to content

Instantly share code, notes, and snippets.

@wrumsby
Last active February 3, 2016 23:49
Show Gist options
  • Save wrumsby/fbbe0f57c9b581aae309 to your computer and use it in GitHub Desktop.
Save wrumsby/fbbe0f57c9b581aae309 to your computer and use it in GitHub Desktop.
px, calc and rem
/**
* px, calc and rem
*/
html {
font-size: 36px;
font-family: sans-serif;
}
@media only screen and (min-width: 480px) {
html {
font-size: calc(36px * 0.8);
}
}
p {
font-size: 1rem;
}
.smaller {
font-size: 0.8em;
}
<!-- content to be placed inside <body>…</body> -->
<p>
Yolo <a href="#" class="smaller">link</a>
</p>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment