{"inline_daily":{"fluid-typography-calculator":{"output_unit_label":"Output unit","rem_recommended":"REM (Accessibility recommended)","generated_css":"Generated CSS code","fluid_visual_preview":"Fluid visual preview","clamp_explainer":"The CSS clamp() function adapts smoothly across viewports without rigid breakpoints.","pixels_px":"Pixels (PX)","copier_css":"Copy CSS","titre_fluide_interactif":"Interactive Fluid Heading","pourquoi_utiliser_css_clamp":"Why use CSS clamp()?"}},"docs_daily":{"tools":{"fluid_type":{"content":{"title":"Fluid typography with clamp(): the rem + vw formula and example","intro":"A fluid size grows in a straight line between two screen widths: slope = (max size − min size) ÷ (max viewport − min viewport), expressed in vw, plus a constant in rem. From 16 px at 375 px wide to 32 px at 1,440 px, the tool outputs clamp(1rem, 0.6479rem + 1.5023vw, 2rem).","details":"
Viewports 375 and 1,440 px, sizes 16 and 32 px: m = 16 ÷ 1,065 = 0.015023, i.e. 1.5023 vw; b = 16 − 0.015023 × 375 = 10.37 px, i.e. 0.6479 rem. Result: clamp(1rem, 0.6479rem + 1.5023vw, 2rem). At 768 px wide the font is 10.37 + 0.015023 × 768 = 21.90 px; it stays at 16 px below 375 px and at 32 px above 1,440 px.
Sources and dates: W3C, WCAG 2.2, success criterion 1.4.4 Resize Text, Recommendation of 12 December 2024 (checked 10/14/2026).
"}},"fluid-typography":{"faqs":[{"question":"How do I read a CSS clamp() value?","answer":"clamp(min, preferred, max) returns the preferred value as long as it stays between the two bounds. With clamp(1rem, 0.6479rem + 1.5023vw, 2rem), the font is 16 px on small screens, 32 px on large ones and grows linearly in between."},{"question":"Why mix rem and vw in the preferred value?","answer":"A size in vw alone ignores the browser's font-size setting. The rem part keeps that response, which helps meet the 200% text resize required by WCAG success criterion 1.4.4."},{"question":"How many pixels is 1 rem?","answer":"16 px by default, the browser base size, so the tool divides pixels by 16. If your CSS sets html to 62.5%, 1 rem equals 10 px and the generated values must be recalculated."},{"question":"Which viewports should I use for fluid type?","answer":"The defaults, 375 px (small smartphone) and 1,440 px (wide laptop screen), cover most cases. Outside that range, the size stays fixed at the minimum or maximum."}]}}}}