Skip to content
On this page

Display

Utilities for applying display type of element.

Quick reference

ClassPropertyToken
blockdisplay: block;block
inline-blockdisplay: inline-block;inline-block
flexdisplay: flex;flex
inline-flexdisplay: inline-flex;inline-flex
griddisplay: grid;grid
inline-griddisplay: inline-grid;inline-grid
tabledisplay: table;table
inline-tabledisplay: inline-table;inline-table
hiddendisplay: none;hidden

Usage

Use the {key} class for set up the display type.

html
<div class="block">
    <!-- ... -->
</div>

Applying conditionally

Breakpoints and media queries

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

html
<div class="block lg:hidden">
    <!-- ... -->
</div>

Customization

Extend your theme

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

scss
@use "lasco" with (
    $extend: (
        "display": (
            "flex"
        )
    )
);

Disabled

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

scss
@use "lasco" with (
    $extend: (
        "display": false
    )
);

Released under the MIT License.