Skip to content

Commit

Permalink
Add transform-gpu and transform-none
Browse files Browse the repository at this point in the history
  • Loading branch information
soilSpoon committed Nov 21, 2020
1 parent 8d14eb4 commit 480dd7a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
4 changes: 2 additions & 2 deletions __fixtures__/transforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import tw from './macro'

// https://tailwindcss.com/docs/transform
tw`transform`
// tw`transform-gpu`
// tw`transform-none`
tw`transform-gpu`
tw`transform-none`

// https://tailwindcss.com/docs/transform-origin
tw`origin-center`
Expand Down
22 changes: 22 additions & 0 deletions src/config/staticStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,28 @@ export default {
config: false,
},

'transform-gpu': {
output: {
'--transform-translate-x': '0',
'--transform-translate-y': '0',
'--transform-rotate': '0',
'--transform-skew-x': '0',
'--transform-skew-y': '0',
'--transform-scale-x': '1',
'--transform-scale-y': '1',
transform:
'translate3d(var(--transform-translate-x), var(--transform-translate-y), 0) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y))',
},
config: false,
},

'transform-none': {
output: {
transform: 'none',
},
config: false,
},

/**
* ===========================================
* Extras
Expand Down

0 comments on commit 480dd7a

Please sign in to comment.