Skip to content

Instantly share code, notes, and snippets.

@goiblas
Created August 14, 2019 21:46
Show Gist options
  • Save goiblas/edbcbc7d552ece4d9cb1db595e92548b to your computer and use it in GitHub Desktop.
Save goiblas/edbcbc7d552ece4d9cb1db595e92548b to your computer and use it in GitHub Desktop.
:root {
--base: 18px;
--scale-factor: .48;
}
body, h1, h2, h3, h4, h5, h6 {
font-size: calc( var(--base) + (var(--base) * var(--scale-factor) * var(--font-increase, 0)));
}
h1 {
--font-increase: 5;
}
h2 {
--font-increase: 4;
}
h3 {
--font-increase: 3;
}
h4 {
--font-increase: 2;
}
h5 {
--font-increase: 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment