Skip to content

Height

Class generator for setting height property for an element.

Quick reference

ClassProperty
h-0height: 0;
h-autoheight: auto;
h-fullheight: 100%;
h-screenheight: 100vh;
h-minheight: min-content;
h-maxheight: max-content;
h-fitheight: fit-content;

Usage

Use the h-{index} class for setup ratio aspect.

html

<div class="h-0">
    <!-- ... -->
</div>

Applying conditionally

Breakpoints and media queries

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

html

<div class="h-0 lg:h-full">
    <!-- ... -->
</div>

Customization

Extend your theme

By default, the configuration provides a handful of general purpose height utilities. You can easily extend the default scales using the Sass configuration.

scss
@use "lasco" with (
    $extend: (
        "height": (
            "25": "25%",
            "50": "50%",
            "75": "75%"
        )
    )
);

Released under the MIT License.