Skip to content

Align Content

Utilities for applying align-content property an element.

Quick reference

ClassProperty
align-content-startalign-content: flex-start;
align-content-endalign-content: flex-end;
align-content-centeralign-content: center;
align-content-betweenalign-content: space-between;
align-content-aroundalign-content: space-around;
align-content-evenlyalign-content: space-evenly;

Usage

Use the align-content-{key} class for set up the align-content type.


<div class="align-content-center">
    <!-- ... -->
</div>

Applying conditionally

Breakpoints and media queries

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


<div class="align-content-center lg:align-content-start">
    <!-- ... -->
</div>

Customization

Extend your theme

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

@use "lasco" with (
    $extend: (
        "align-content": (
            center
        )
    )
);

Disabled

You can easily disable the properties you don't need to use.

@use "lasco" with (
    $extend: (
        "align-content": false
    )
);

Released under the MIT License.