Skip to content

Align Self

Utilities for applying align-self property an element.

Quick reference

ClassProperty
align-self-autoalign-self: auto;
align-self-startalign-self: flex-start;
align-self-endalign-self: flex-end;
align-self-centeralign-self: center;
align-self-stretchalign-self: stretch;
align-self-baselinealign-self: baseline;

Usage

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


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

Applying conditionally

Breakpoints and media queries

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


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

Customization

Extend your theme

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

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

Disabled

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

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

Released under the MIT License.