DEV Community

Kabue Charles
Kabue Charles

Posted on

2 3

How to set min-font-size in CSS

font-size:calc(12px + 1.5vw);
/*
* How to set min-font-size in CSS
* https://stackoverflow.com/a/37836926
* This is because the static part of calc() defines the minimum.
* Even though the dynamic part might shrink to something near 0.
*/

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs