Calculate what vw does to one heading
CSS defines 1vw relative to one percent of the viewport width. At a 400 CSS pixel width, 5vw equals 20 CSS pixels. At 1,200 CSS pixels it equals 60 CSS pixels. Put those sizes next to the content rather than judging only the formula. Pure viewport scaling can make type unexpectedly small or large at the ends of the range.
Bound the type scale with a minimum and maximum
W3C’s own design system uses clamp() and viewport units to create a bounded range. For a trial heading, try font-size: clamp(1.5rem, 1rem + 2vw, 3rem). The middle value supplies the fluid preference and the outer values define limits. Treat them as sample values. Keep a separate body style and inspect the actual long heading at both bounds.
Check enlargement as well as window resizing
Compare your headline, paragraph and button on the narrowest layout. Increase zoom and verify that the text can grow, wrap and remain visible. Relative limits are one design choice rather than a replacement for this proof. The CSS font size guide explains the other units. Try the homepage text-style generator for a separate copyable caption.
Your questions, answered.
How big is 5vw on a 400-pixel-wide viewport?
It is 20 CSS pixels in that example. It changes when the viewport changes.
Do I need to apply viewport scaling to body text?
Choose size behavior by role. A fluid headline can sit above body text sized independently for comfortable reading.
Sources & background
Sources supporting this page’s explanations. Practical examples are our editorial suggestions.