Open this example in the interactive library
Source code
<style>
.demo {
font-size: clamp(1rem, 5vw, 2rem);
}
</style>
<div class="demo">Scale text fluidly with clamp</div>
Scale text fluidly with clamp with native CSS. The preview includes a small shared demo stylesheet.
Open this example in the interactive library
<style>
.demo {
font-size: clamp(1rem, 5vw, 2rem);
}
</style>
<div class="demo">Scale text fluidly with clamp</div>