Skip to main content

Font weight

The font weight styles set the font-weight style for an element.

Each font weight weight base class has a class to go with each of the media query viewport sizes. For example:

font-bold-3xs
font-bold-2xs
font-bold-xs
font-bold-sm
font-bold-md
font-bold-lg
font-bold-xl
font-bold-1xl
font-bold-3xl
font-bold-4xl
font-bold-5xl

How to import into your CSS

Import this into your CSS with:

@import 'cacao-css/dist/typography/weight.css';

Imports are available for all media query viewport sizes.

@import 'cacao-css/dist/typography/3xs/weight.css';
@import 'cacao-css/dist/typography/2xs/weight.css';
@import 'cacao-css/dist/typography/xs/weight.css';
@import 'cacao-css/dist/typography/sm/weight.css';
@import 'cacao-css/dist/typography/md/weight.css';
@import 'cacao-css/dist/typography/lg/weight.css';
@import 'cacao-css/dist/typography/xl/weight.css';
@import 'cacao-css/dist/typography/2xl/weight.css';
@import 'cacao-css/dist/typography/3xl/weight.css';
@import 'cacao-css/dist/typography/4xl/weight.css';
@import 'cacao-css/dist/typography/5xl/weight.css';

See Import Cacao CSS for more information.

Source CSS

Default styles

typography/weight.css
/* =========================================================================== *\
Font weight utilities
\* =========================================================================== */

.font-normal {
font-weight: 400;
}

.font-bold {
font-weight: 700;
}

3xs styles

typography/3xs/weight.css
/* =========================================================================== *\
Font weight utilities
\* =========================================================================== */

@media (--m-3xs) {
.font-normal-3xs {
font-weight: 400;
}

.font-bold-3xs {
font-weight: 700;
}
}

2xs styles

typography/2xs/weight.css
/* =========================================================================== *\
Font weight utilities
\* =========================================================================== */

@media (--m-2xs) {
.font-normal-2xs {
font-weight: 400;
}

.font-bold-2xs {
font-weight: 700;
}
}

xs styles

typography/xs/weight.css
/* =========================================================================== *\
Font weight utilities
\* =========================================================================== */

@media (--m-xs) {
.font-normal-xs {
font-weight: 400;
}

.font-bold-xs {
font-weight: 700;
}
}

sm styles

typography/sm/weight.css
/* =========================================================================== *\
Font weight utilities
\* =========================================================================== */

@media (--m-sm) {
.font-normal-sm {
font-weight: 400;
}

.font-bold-sm {
font-weight: 700;
}
}

md styles

typography/md/weight.css
/* =========================================================================== *\
Font weight utilities
\* =========================================================================== */

@media (--m-md) {
.font-normal-md {
font-weight: 400;
}

.font-bold-md {
font-weight: 700;
}
}

lg styles

typography/lg/weight.css
/* =========================================================================== *\
Font weight utilities
\* =========================================================================== */

@media (--m-lg) {
.font-normal-lg {
font-weight: 400;
}

.font-bold-lg {
font-weight: 700;
}
}

xl styles

typography/xl/weight.css
/* =========================================================================== *\
Font weight utilities
\* =========================================================================== */

@media (--m-xl) {
.font-normal-xl {
font-weight: 400;
}

.font-bold-xl {
font-weight: 700;
}
}

2xl styles

typography/2xl/weight.css
/* =========================================================================== *\
Font weight utilities
\* =========================================================================== */

@media (--m-2xl) {
.font-normal-2xl {
font-weight: 400;
}

.font-bold-2xl {
font-weight: 700;
}
}

3xl styles

typography/3xl/weight.css
/* =========================================================================== *\
Font weight utilities
\* =========================================================================== */

@media (--m-3xl) {
.font-normal-3xl {
font-weight: 400;
}

.font-bold-3xl {
font-weight: 700;
}
}

4xl styles

typography/4xl/weight.css
/* =========================================================================== *\
Font weight utilities
\* =========================================================================== */

@media (--m-4xl) {
.font-normal-4xl {
font-weight: 400;
}

.font-bold-4xl {
font-weight: 700;
}
}

5xl styles

typography/5xl/weight.css
/* =========================================================================== *\
Font weight utilities
\* =========================================================================== */

@media (--m-5xl) {
.font-normal-5xl {
font-weight: 400;
}

.font-bold-5xl {
font-weight: 700;
}
}