Viewport-relative Units

suggest change

1vmin is one percent of the viewport's smaller dimension; 1vmax is one percent of its larger dimension.

.hero__title {
  font-size: clamp(2rem, 6vmin, 5rem);
}

Modern CSS also distinguishes viewport sizes affected by mobile browser interfaces:

Unit family Meaning
svw, svh Small viewport size
lvw, lvh Large viewport size
dvw, dvh Dynamic viewport size

Use 100dvh when a region should follow the currently visible viewport as browser controls expand or collapse. Use 100svh when content must fit without being obscured even in the smallest viewport state.

For readable text, combine viewport units with a user-scalable unit such as rem and set bounds with clamp().

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents