Skip to content

Place Content

Utilities for applying place-content property an element.

Quick reference

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

Usage

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

html

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

html

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

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

Released under the MIT License.