Skip to content

overflow

Class generator for setting overflow property for an element.

Quick reference

ClassPropertyToken
overflow-autooverflow: auto;auto
overflow-x-autooverflow-x: auto;auto
overflow-y-autooverflow-y: auto;auto
overflow-hiddenoverflow: hidden;hidden
overflow-x-hiddenoverflow-x: hidden;hidden
overflow-y-hiddenoverflow-y: hidden;hidden
overflow-x-clipoverflow-x: clip;clip
overflow-y-clipoverflow-y: clip;clip
overflow-visibleoverflow: visible;visible
overflow-x-visibleoverflow-x: visible;visible
overflow-y-visibleoverflow-y: visible;visible
overflow-scrolloverflow: scroll;scroll
overflow-x-scrolloverflow-x: scroll;scroll
overflow-y-scrolloverflow-y: scroll;scroll

Usage

Use the {key} class for setup the display type.

html

<div class="overflow-auto">
    <!-- ... -->
</div>

Applying conditionally

Breakpoints and media queries

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

html

<div class="overflow-auto lg:overflow-scroll">
    <!-- ... -->
</div>

Customization

Extend your theme

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

scss
@use "lasco" with (
    $extend: (
        "overflow": (
            "auto"
        )
    )
);

Released under the MIT License.