Syntax

font-weight

Setting the weight of the font.

Overview

ClassDeclarations
font-weight:`weight`font-weight: `weight`;
font-weight:normalfont-weight: normal;
font:lighterfont: lighter;
font:bolderfont-weight: bolder;
font:thinfont-weight: 100;
font:extralightfont-weight: 200;
font:lightfont-weight: 300;
font:regularfont-weight: 400;
font:mediumfont-weight: 500;
font:semiboldfont-weight: 600;
font:boldfont-weight: 700;
font:extraboldfont-weight: 800;
font:heavyfont-weight: 900;

Examples

Basic usage

Use tokens like font:thin, font:regular, and font:bold to set the font weight of an element.

font:thin
Elegant forms shape visual harmony.
font:extralight
Elegant forms shape visual harmony.
font:light
Elegant forms shape visual harmony.
font:regular
Elegant forms shape visual harmony.
font:medium
Elegant forms shape visual harmony.
font:semibold
Elegant forms shape visual harmony.
font:bold
Elegant forms shape visual harmony.
font:extrabold
Elegant forms shape visual harmony.
font:heavy
Elegant forms shape visual harmony.
<div class="font:thin">Elegant forms shape visual harmony.</div><div class="font:extralight">Elegant forms shape visual harmony.</div><div class="font:regular">Elegant forms shape visual harmony.</div><div class="font:medium">Elegant forms shape visual harmony.</div><div class="font:semibold">Elegant forms shape visual harmony.</div><div class="font:bold">Elegant forms shape visual harmony.</div><div class="font:extrabold">Elegant forms shape visual harmony.</div><div class="font:heavy">Elegant forms shape visual harmony.</div>

Apply conditionally

Apply styles based on different states using selectors and conditional queries.

<div class="font-weight:normal:hover font-weight:normal@sm font-weight:normal@dark font-weight:normal@print">…</div>

  • Master UI


© 2025 Aoyue Design LLC.MIT License
Trademark Policy