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

Will-change utilities #612

Merged
merged 1 commit into from
Jan 16, 2022
Merged

Will-change utilities #612

merged 1 commit into from
Jan 16, 2022

Conversation

ben-rogerson
Copy link
Owner

@ben-rogerson ben-rogerson commented Jan 16, 2022

This PR adds new utilities for will-change:

import tw, { theme } from 'twin.macro'

theme`willChange`
tw`will-change-auto`
tw`will-change-scroll`
tw`will-change-contents`
tw`will-change-transform`
tw`will-change-[top,left]`

// ↓ ↓ ↓ ↓ ↓ ↓

({
  "auto": "auto",
  "scroll": "scroll-position",
  "contents": "contents",
  "transform": "transform"
});
({
  "willChange": "auto"
});
({
  "willChange": "scroll-position"
});
({
  "willChange": "contents"
});
({
  "willChange": "transform"
});
({
  "willChange": "top,left"
});

Ref #5448

@ben-rogerson ben-rogerson merged commit 9afa05e into master Jan 16, 2022
@ben-rogerson ben-rogerson deleted the feature/will-change-utilities branch January 16, 2022 10:35
@ben-rogerson ben-rogerson mentioned this pull request Jan 16, 2022
@ben-rogerson ben-rogerson changed the title Add will-change utilities Will-change utilities Jan 16, 2022
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.

1 participant