Skip to content

Text Transform

Utilities for applying text-transform to an element.

Quick reference

ClassProperty
text-uppercasetext-transform: uppercase;
text-lowercasetext-transform: lowercase;
text-capitalizetext-transform: capitalize;
text-normaltext-transform: none;

Usage

Use the text-{key} class for setup the text-transform.


<div class="text-normal">
    <!-- ... -->
</div>

Applying conditionally

Breakpoints and media queries

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


<div class="text-normal lg:text-uppercase">
    <!-- ... -->
</div>

Customization

Extend your theme

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

@use "lasco" with (
    $extend: (
        "text-transform": (
            lowercase
        )
    )
);

Disabled

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

@use "lasco" with (
    $extend: (
        "text-transform": false
    )
);

Released under the MIT License.