Skip to content

Instantly share code, notes, and snippets.

@ryanmorr
Created May 20, 2024 19:33
Show Gist options
  • Save ryanmorr/9c2198304c4bb0c0d7ba9f9f82aa355d to your computer and use it in GitHub Desktop.
Save ryanmorr/9c2198304c4bb0c0d7ba9f9f82aa355d to your computer and use it in GitHub Desktop.
Define a globally responsive font size relative to the viewport
/* Courtesy of: https://jameshfisher.com/2024/03/12/a-formula-for-responsive-font-size/ */
:root {
font-size: calc(1rem + 0.25vw);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment