Last active
February 3, 2016 23:49
-
-
Save wrumsby/fbbe0f57c9b581aae309 to your computer and use it in GitHub Desktop.
px, calc and rem
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
/** | |
* 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; | |
} |
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
<!-- content to be placed inside <body>…</body> --> | |
<p> | |
Yolo <a href="#" class="smaller">link</a> | |
</p> |
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
// alert('Hello world!'); |
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
{"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