Skip to content
On this page

Align Self

Utilities for applying align-self property an element.

Quick reference

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

Usage

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

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

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

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

Disabled

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

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

Released under the MIT License.