Skip to content

Place Content

Utilities for applying place-content property an element.

Quick reference

ClassProperty
place-content-startplace-content: flex-start;
place-content-endplace-content: flex-end;
place-content-centerplace-content: center;
place-content-betweenplace-content: space-between;
place-content-aroundplace-content: space-around;
place-content-evenlyplace-content: space-evenly;
place-content-stretchplace-content: stretch;

Usage

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


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

Applying conditionally

Breakpoints and media queries

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


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

Customization

Extend your theme

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

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

Disabled

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

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

Released under the MIT License.