Skip to content

Place Items

Utilities for applying place-items property an element.

Quick reference

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

Usage

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

html

<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.

html

<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.

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

Released under the MIT License.