Skip to content

Instantly share code, notes, and snippets.

@sarvar
Created February 13, 2017 16:12
Show Gist options
  • Save sarvar/2d767b2c534645e928ae48926e5c6092 to your computer and use it in GitHub Desktop.
Save sarvar/2d767b2c534645e928ae48926e5c6092 to your computer and use it in GitHub Desktop.
Responsive font size
@function get-vw($target)
$vw-context: (1200 * 0.01) * 1px
@return ($target / $vw-context) * 1vw
body
font-size: get-vw($default-font-size)
h1
font-size: get-vw($h1-font-size)
h2
font-size: get-vw($h2-font-size)
h3
font-size: get-vw($h3-font-size)
h4
font-size: get-vw($h4-font-size)
h5
font-size: get-vw($h5-font-size)
h6
font-size: get-vw($h6-font-size)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment