Skip to content

Brightness

Utilities for applying brightness to an element.

Quick reference

ClassProperty
brightness-0filter: brightness(0);
brightness-100filter: brightness(1);

Usage

Use the brightness-{amount} class for setup ratio aspect.


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

Applying conditionally

Breakpoints and media queries

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


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

Customization

Extend your theme

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

@use "lasco" with (
    $extend: (
        "brightness": (
            50: 0.5
        )
    )
);

Note: the amount can be a number (0 to 1) or a percentage value. ( Source MDN)

Disabled

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

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

Released under the MIT License.