Performance: Font weight control
Font weight control affects text rendering speed and page load by influencing font file size and browser paint time.
Jump into concepts and practice - no test required
<p class="font-bold">Text</p><p class="font-thin font-bold font-extrabold">Text</p>| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Multiple font weights loaded | No extra DOM nodes | 0 | High paint cost due to font load delay | [X] Bad |
| Single font weight used | No extra DOM nodes | 0 | Lower paint cost, faster text rendering | [OK] Good |
font-thin for very thin text and font-black for very thick text.font-thin is the class that makes text very thin, thinner than font-light.font-bold for bold text, not generic words like heavy or thick.font-bold is the official class to make text bold in Tailwind.font-semibold?font-semibold is between medium and bold.font-semibold to weight descriptionfont-semibold means medium-bold text, stronger than normal but not the thickest.font-bld. What happens?font-bld is a valid Tailwind classfont-bld is not a valid Tailwind class, so it won't apply any font weight style.lg: apply styles on large screens.font-thin sets thin text by default; lg:font-black applies very thick text on large screens.font-lg:font-black or lg-font-black are invalid syntax in Tailwind.