Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add will-change utilities #5448

Merged
merged 1 commit into from
Sep 8, 2021
Merged

Add will-change utilities #5448

merged 1 commit into from
Sep 8, 2021

Conversation

reinink
Copy link
Member

@reinink reinink commented Sep 8, 2021

This PR adds new will-change utilities to Tailwind CSS. By default, the following classes are included:

Class CSS
will-change-auto will-change: auto
will-change-scroll will-change: scroll-position
will-change-contents will-change: contents
will-change-transform will-change: transform

The available utilities can be customized under the theme.willChange section of your tailwind.config.js file.

These utilities also support arbitrary values, so if you need to use another value that doesn't make sense to include in your Tailwind config, you can do this using the square bracket notation:

<div class="will-change-[top,left]">Example</div>

Co-Authored-By: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant