Skip to content

Instantly share code, notes, and snippets.

@subsevenx
Created September 19, 2021 04:50
Show Gist options
  • Save subsevenx/543dccf3a7ff5b29697b88b355125ea6 to your computer and use it in GitHub Desktop.
Save subsevenx/543dccf3a7ff5b29697b88b355125ea6 to your computer and use it in GitHub Desktop.
global_clamp.css
h1 {
font-size: clamp(2.125rem, calc( 12px + 2.750vw ), 2.875rem);
line-height: 1.1;
}
h2 {
font-size: clamp(1.750rem, calc( 12px + 2.000vw ), 2.250rem);
line-height: 1.1;
}
h3 {
font-size: clamp(1.425rem, calc( 12px + 1.500vw ), 1.875rem);
line-height: 1.1;
}
h4 {
font-size: clamp(1.250rem, calc( 12px + 1.000vw ), 1.500rem);
line-height: 1.1;
}
p {
font-size: clamp(1.150rem, calc( 12px + 0.600vw ), 1.250rem);
line-height: 1.1;
}
span {
font-size: clamp(1.000rem, calc( 12px + 0.400vw ), 1.125rem);
line-height: 1.1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment