Skip to content

Justify Content

Utilities for applying justify-content property an element.

Quick reference

ClassProperty
justify-content-startjustify-content: flex-start;
justify-content-endjustify-content: flex-end;
justify-content-centerjustify-content: center;
justify-content-betweenjustify-content: space-between;
justify-content-aroundjustify-content: space-around;
justify-content-evenlyjustify-content: space-evenly;
justify-content-stretchjustify-content: stretch;

Usage

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


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

Applying conditionally

Breakpoints and media queries

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


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

Customization

Extend your theme

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

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

Disabled

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

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

Released under the MIT License.