Loading...
.card-title {
font-size: 5cqi;
}.card {
container-type: inline-size;
}
.card-title {
font-size: clamp(1rem, 5cqi, 2rem);
}The .card container gives cqi a reference size, and clamp() with 'rem' keeps text readable and zoomable.
container-type set; without one, the units resolve against the small viewport.cqi is used instead of cqw where sizes should follow the writing direction.rem inside clamp(), so text still grows with user zoom.cqw is 1% of the container's width, while cqi is 1% of its inline size, which follows the writing mode.
No. They only need an ancestor with container-type; an @container rule is optional.
They fall back to the small viewport, so they act like svw and svh.