introduction
customization
modules
elements
helpers
ColorsSizingSpacingTypographyFlexboxOther helpers
presets
packages

Typography

Customize the text properties using the following typography helpers.

Font size

Use the following classes to customize the font-size property of any element, using the values defined in the fontSizes scale:

ClassProperty
has-size-0Will apply the font size defined in fontSizes[0]. By default 0.75rem;
has-size-1Will apply the font size defined in fontSizes[1]. By default 1rem;
has-size-2Will apply the font size defined in fontSizes[2]. By default 1.25rem;
has-size-3Will apply the font size defined in fontSizes[3]. By default 1.5rem;
has-size-4Will apply the font size defined in fontSizes[4]. By default 2rem;
has-size-5Will apply the font size defined in fontSizes[5]. By default 2.5rem;
has-size-6Will apply the font size defined in fontSizes[6]. By default 3rem;
has-size-7Will apply the font size defined in fontSizes[7]. By default 3.5rem;
has-size-8Will apply the font size defined in fontSizes[8]. By default 4rem;
has-size-9Will apply the font size defined in fontSizes[9]. By default 4.5rem;

Example:

The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
<div class="has-size-0">The quick brown fox jumps over the lazy dog.</div>
<div class="has-size-1">The quick brown fox jumps over the lazy dog.</div>
<div class="has-size-2">The quick brown fox jumps over the lazy dog.</div>
<div class="has-size-3">The quick brown fox jumps over the lazy dog.</div>
<div class="has-size-4">The quick brown fox jumps over the lazy dog.</div>
<div class="has-size-5">The quick brown fox jumps over the lazy dog.</div>
<div class="has-size-6">The quick brown fox jumps over the lazy dog.</div>
<div class="has-size-7">The quick brown fox jumps over the lazy dog.</div>
<div class="has-size-8">The quick brown fox jumps over the lazy dog.</div>
<div class="has-size-9">The quick brown fox jumps over the lazy dog.</div>

Font Weight

Use the following classes to customize the font-weight property of any element:

ClassProperty
has-weight-lightfont-weight: 300;
has-weight-normalfont-weight: 400;
has-weight-mediumfont-weight: 500;
has-weight-boldfont-weight: 700;
has-weight-blackfont-weight: 900;

Example:

Text using has-weight-normal
Test using has-weight-bold
<div class="has-weight-normal">Text using has-weight-normal</div>
<div class="has-weight-bold">Test using has-weight-bold</div>

Line height

Use the following classes to control the line height of your text:

ClassProperty
has-lh-noneline-height: 1;
has-lh-tightline-height: 1.25;
has-lh-normalline-height: 1.5;
has-lh-looseline-height: 2;

Use has-lh-none, has-lh-tight, has-lh-normal, and has-lh-loose to apply a relative line-height to a text block based on its text size.

has-lh-none

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

has-lh-tight

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

has-lh-normal

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

has-lh-loose

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

<div class="has-test-gray-500 has-weight-bold has-mb-2">has-lh-none</div>
<p class="has-lh-none">
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore 
    et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut 
    aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 
    cillum dolore eu fugiat nulla pariatur.
</p>
<div class="has-test-gray-500 has-weight-bold has-mb-2">has-lh-tight</div>
<p class="has-lh-tight">
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore 
    et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut 
    aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 
    cillum dolore eu fugiat nulla pariatur.
</p>
<div class="has-test-gray-500 has-weight-bold has-mb-2">has-lh-normal</div>
<p class="has-lh-normal">
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore 
    et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut 
    aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 
    cillum dolore eu fugiat nulla pariatur.
</p>
<div class="has-test-gray-500 has-weight-bold has-mb-2">has-lh-loose</div>
<p class="has-lh-loose">
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore 
    et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut 
    aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 
    cillum dolore eu fugiat nulla pariatur.
</p>

Text alignment

Use one of the following classes to set the horizontal align of your text inside the container element:

ClassProperty
has-text-justifiedtext-align: justify;
has-text-centertext-align: center;
has-text-lefttext-align: left;
has-text-righttext-align: right;

Use the has-text-justified helper to justify the inline contents:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
<div class="has-text-justified">
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor 
    incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud 
    exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</div>

Use the has-text-left helper to align inline contents to the left:

Left aligned text
<div class="has-text-left">Left aligned text</div>

Use the has-text-center helper to center inline contents:

Centered text
<div class="has-text-center">Centered text</div>

Use the has-text-right helper to align inline contents to the right:

Right aligned text
<div class="has-text-right">Right aligned text</div>

Text transform

Use the following helpers to apply some transforms to your text:

ClassProperty
is-italicfont-style: italic;
is-underlinedtext-decoration: underline;
is-not-underlinedtext-decoration: none;
is-uppercasetext-transform: uppercase;
is-lowercasetext-transform: lowercase;
is-capitalizedtext-transform: capitalize;

Use the is-underlined to underline the text:

Lorem ipsum dolor sit amet, consectetur adipiscing elit...
<strong class="is-underlined">
    Lorem ipsum dolor sit amet, consectetur adipiscing elit...
</strong>

Use is-italic to display text in italic style:

Lorem ipsum dolor sit amet, consectetur adipiscing elit...
<strong class="is-italic">
    Lorem ipsum dolor sit amet, consectetur adipiscing elit...
</strong>

Use the is-uppercase helper to convert all characters of your text to uppercase:

Lorem ipsum dolor sit amet, consectetur adipiscing elit...
<strong class="is-uppercase">
    Lorem ipsum dolor sit amet, consectetur adipiscing elit...
</strong>

Use the is-lowercase helper to convert all characters of your text to lowercase:

Lorem Ipsum Dolor Sit Amet, Consectetur Adipiscing Elit...
<strong class="is-lowercase">
    Lorem Ipsum Dolor Sit Amet, Consectetur Adipiscing Elit...
</strong>

Use the is-capitalized helper to convert the first character of each word of your text to uppercase:

Lorem ipsum dolor sit amet, consectetur adipiscing elit...
<strong class="is-capitalized">
    Lorem ipsum dolor sit amet, consectetur adipiscing elit...
</strong>

Text selection

Use is-unselectable to prevent selecting text of the element:

You can not select this text.
<span class="is-unselectable has-text-center">
    You can not select this text.
</span>

Vertical align

Use the following helpers to control the vertical alignment of a inline block.

ClassProperty
has-align-topvertical-align: top;
has-align-middlevertical-align: middle;
has-align-bottomvertical-align: bottom;

Example:

<div class="is-inline-block has-align-bottom">...</div>

Designed and maintained with by @jmjuanes.

Code is licensed under MIT, documentation under Creative Commons Attribution 4.0.

Currently v4.3.1