Use :root for Flexible Type (follow viewport)

Use :root for Flexible Type (follow viewport)


Calculate the font size based on the viewport height and width, then use the root em unit based on the value calculated by :root.

:root {
font-size: calc(1vw + 1vh + .5vmin);
}

See the Pen Use `:root` for Flexible Type by Matt Smith (@AllThingsSmitty) on CodePen.

Comments

comments

Categories

+ There are no comments

Add yours