Skip to content

Instantly share code, notes, and snippets.

@lxmmxl56
Created July 22, 2019 03:31
Show Gist options
  • Save lxmmxl56/f1d14f56269e0d3adf1b089d1d88a6c3 to your computer and use it in GitHub Desktop.
Save lxmmxl56/f1d14f56269e0d3adf1b089d1d88a6c3 to your computer and use it in GitHub Desktop.
Responsive Font Size w/o Breakpoints - This can be used for fully responsive font size based on a minimum and maximum font size along with a minimum and maximum width. Uses a calc with vw units to set the size.
.class {
font-size: calc(14px + (24 - 14) * (100vw - 400px)/(1600 - 400));
}
font: min max min width: min max min
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment