Skip to content

Instantly share code, notes, and snippets.

@jenswittmann
Last active April 14, 2020 08:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jenswittmann/485453accb417361f80c57fc16c700f3 to your computer and use it in GitHub Desktop.
Save jenswittmann/485453accb417361f80c57fc16c700f3 to your computer and use it in GitHub Desktop.
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