Skip to content

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 <[email protected]>
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.

2 participants