Skip to content

Instantly share code, notes, and snippets.

@goiblas
Last active August 14, 2019 22:36
Show Gist options
  • Save goiblas/df468a69a9c6cf876d0ae2b1553764be to your computer and use it in GitHub Desktop.
Save goiblas/df468a69a9c6cf876d0ae2b1553764be to your computer and use it in GitHub Desktop.
:root {
--base: 16px;
--scale-factor: .28;
--rhythm: 24px;
}
@media(min-width: 768px) {
:root {
--scale-factor: .48;
}
}
body, h1, h2, h3, h4, h5, h6 {
font-size: calc( var(--base) + (var(--base) * var(--scale-factor) * var(--font-increase, 0)));
line-height: calc(var(--rhythm) + (var(--rhythm) * var(--rhythm-increase, 0)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment