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 transform-gpu and transform-none #200

Merged
merged 2 commits into from
Nov 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: 17 additions & 5 deletions __snapshots__/plugin.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15998,8 +15998,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 Expand Up @@ -16270,9 +16270,21 @@ tw\`-skew-y-1\`
'--tw-scale-y': '1',
transform:
'translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))',
}) // tw\`transform-gpu\`
// tw\`transform-none\`
// https://tailwindcss.com/docs/transform-origin
})
;({
'--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))',
})
;({
transform: 'none',
}) // https://tailwindcss.com/docs/transform-origin

;({
transformOrigin: '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