Skip to content

Text

CSS classes to quickly style the text color, font-size and font-weight of an element.

Since v2.2.0

Alignment

ClassStyles
text-starttext-align: start;
text-centertext-align: center;
text-endtext-align: end;
text-justifytext-align: justify;

Color

ClassStylesNotes
text-bg-surfacebackground-color: var(--background);
color: var(--foreground);
text-bg-surface-secondarybackground-color: var(--background-secondary);
color: var(--foreground-secondary);
text-bg-surface-tertiarybackground-color: var(--background-tertiary);
color: var(--foreground-tertiary);
text-subtlecolor: var(--foreground-subtle);
text-subtle-secondarycolor: var(--foreground-subtle-secondary);
text-subtle-tertiarycolor: var(--foreground-subtle-tertiary);
text-[color-name]color: [color-value];See applying text colors for more details.
text-bg-[color-name]color: [color-value];Valid color names are: default, primary, secondary, success, danger, warning, info, light and dark.

Font Size

ClassStyles
h1font-size: calc(1.375rem + 1.5vw);
h2font-size: calc(1.325rem + 0.9vw);
h3font-size: calc(1.3rem + 0.6vw);
h4font-size: calc(1.275rem + 0.3vw);
h5font-size: 1.25rem;

Font Weight

ClassStyles
font-weight-lightfont-weight: 300;
font-weight-normalfont-weight: 400;
font-weight-mediumfont-weight: 500;
font-weight-semiboldfont-weight: 600;
font-weight-boldfont-weight: 700;
font-weight-bolderfont-weight: 900;

Released under the BSD-3-Clause License.