Skip to content

Place Self

Utilities for applying place-self property an element.

Quick reference

ClassPropertyToken
place-self-autoplace-self: auto;auto
place-self-startplace-self: start;start
place-self-endplace-self: end;end
place-self-centerplace-self: center;center
place-self-stretchplace-self: stretch;stretch

Usage

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

html

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

Applying conditionally

Breakpoints and media queries

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

html

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

Customization

Extend your theme

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

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

Released under the MIT License.