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

fix(preset-mini): transform-cpu should not include rotate-x and rotate-y #3813

Merged
merged 5 commits into from
Jun 11, 2024

Conversation

zzc6332
Copy link
Contributor

@zzc6332 zzc6332 commented May 16, 2024

The class name transform-cpu does not achieve the expected effect because rotateX() and rotateY() cause the browser to use gpu rendering.
There is an example created by stackblitz, demonstrating the difference when an svg icon is rendered using cpu rendering versus gpu rendering in Chrome. The difference will not be shown in "Open Preview" but will be shown in "Open Preview in new tab":
001
Enabling the Layer borders option in the Rendering tab of Chrome’s DevTools allows for better observation of the differences between them:
002

The class name `transform-cpu` does not achieve the expected effect
because `rotateX()` and `rotateY()` cause the browser to use gpu
rendering.
@zzc6332 zzc6332 requested a review from antfu as a code owner May 16, 2024 08:32
Copy link

netlify bot commented May 16, 2024

Deploy Preview for unocss ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit b004ea6
🔍 Latest deploy log https://app.netlify.com/sites/unocss/deploys/664cc47cb70b15000839b0d9
😎 Deploy Preview https://deploy-preview-3813--unocss.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@antfu antfu changed the title fix(preset-mini): transform-cpu fix(preset-mini): transform-cpu should not include rotate-x and rotate-y May 16, 2024
@antfu antfu merged commit ae072a5 into unocss:main Jun 11, 2024
9 checks passed
Simon-He95 pushed a commit to Simon-He95/unocss that referenced this pull request Jun 12, 2024
Simon-He95 pushed a commit to Simon-He95/unocss that referenced this pull request Jun 12, 2024
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

2 participants