Skip to content

Place Self

Utilities for applying place-self property an element.

Quick reference

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

Usage

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


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


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

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

Disabled

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

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

Released under the MIT License.