Skip to content

Place Items

Utilities for applying place-items property an element.

Quick reference

ClassProperty
place-items-startplace-items: flex-start;
place-items-endplace-items: flex-end;
place-items-centerplace-items: center;
place-items-stretchplace-items: stretch;

Usage

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


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

Applying conditionally

Breakpoints and media queries

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


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

Customization

Extend your theme

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

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

Disabled

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

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

Released under the MIT License.