News Score: Score the News, Sort the News, Rewrite the Headlines

A formula for responsive font-size

This CSS is now part of most websites I make: :root { font-size: calc(1rem + 0.25vw); } This rule is an alternative to @media rules like this from nytimes.com: p { font-size: 1.125rem; } @media (min-width: 740px) { p { font-size: 1.25rem; } } This pattern is the norm: a small font size, a large font size, and a breakpoint. Here’s a sample of common sites: Small font-size Large font-size Breakpoint Medium.com 1.125rem 1.25rem 728px Substack.com 1.125rem 1.25rem 768px Nytimes.com 1.125rem 1.25rem ...

Read more at jameshfisher.com

© News Score  score the news, sort the news, rewrite the headlines