Skip to content
On this page

Text Transform

Utilities for applying text-transform to an element.

Quick reference

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

Usage

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

html
<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.

html
<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.

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

Disabled

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

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

Released under the MIT License.