Skip to content

Font Weight

Utilities for applying font-weight to an element.

Quick reference

ClassPropertyToken
font-100font-weight: 100;100
font-200font-weight: 200;200
font-300font-weight: 300;300
font-400font-weight: 400;400
font-500font-weight: 500;500
font-600font-weight: 600;600
font-700font-weight: 700;700
font-800font-weight: 800;800
font-900font-weight: 900;900

Usage

Use the font-{number} class for set up the font-weight.

html

<div class="font-400">
    <!-- ... -->
</div>

Applying conditionally

Breakpoints and media queries

You can also control the responsive breakpoint with variant class modifiers. For example lg:font-700 will be only apply on large screens size and above.

html

<div class="font-400 lg:font-700">
    <!-- ... -->
</div>

Customization

Extend your theme

By default, the configuration provides a handful of general purpose font-weight type utilities. You can easily filter the default scales using the Sass configuration.

scss
@use "lasco" with (
    $extend: (
        "font-weight": (
            "400"
        )
    )
);

Released under the MIT License.