Clone on GitHub
chevron_forward

Scale

First Published On:
April 25, 2024
Last Updated:
July 21, 2024

Figure 1. Animation demonstrating state layer implementation.

No items found.

Overview

Scaling is a way to make the appearance of an element larger or smaller. It does not change its actual size. A 24x24 pixel square div with .scaleUp__wholestep applied will still be 24x24 pixels, but it will look like it's 1.618 times larger.

Usually only recommended to use in a pinch as a combo class for when you're trying to get icons to behave. You normally want them to scale up and down by changing their font size, but sometimes it doesn't listen, and it's helpful for MVP's to just cheat. Don't tell anyone I said that was okay.

Recommended Usage

Customization

Resources that mention this topic

No items found.
info

Get Help from a LiftKit Expert

arrow_forward
Book Quick Chat

Give Us Feedback

Click or tap to reveal form.
expand_more
check_circle
Success! An email has been sent to you with more details.
Please allow up to 5 minutes for it to arrive. Mailchimp can take a bit.
error
Error: Something went wrong. Email info@chainlift.io directly for assistance.
.scaleUp__wholestep {
    transform: scale(var(--wholestep));
}

.scaleUp__halfstep {
    transform: scale(var(--halfstep));
}

.scaleUp__quarterstep {
    transform: scale(var(--quarterstep));
}

.scaleDown__wholestep {
    transform: scale(calc(1 / var(--wholestep)));
}

.scaleDown__halfstep {
    transform: scale(calc(1 / var(--halfstep)));
}

.scaleDown__quarterstep {
    transform: scale(calc(1 / var(--quarterstep)));
}
content_copy
code snippets will appear here