Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Set font-size for <html> proportional for scalling everything with rem.
<!--
$basePxFor1rem = 16;
$baseDesignWidthFromAdobeXD = 1920;
$baseFontSize = 100 * $basePxFor1rem / $baseDesignWidthFromAdobeXD;
Result: .833333333333333vw;
-->
<style>
html {
font-size: .833333333333333vw;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment