Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(preset-mini): revert base perspective in transform#5120

Merged
zyyv merged 1 commit intomainfrom
mini/revert/transform
Feb 26, 2026
Merged

fix(preset-mini): revert base perspective in transform#5120
zyyv merged 1 commit intomainfrom
mini/revert/transform

Conversation

@zyyv
Copy link
Member

@zyyv zyyv commented Feb 26, 2026

Related to #5114

@zyyv zyyv requested a review from antfu as a code owner February 26, 2026 05:41
Copilot AI review requested due to automatic review settings February 26, 2026 05:41
@netlify
Copy link

netlify bot commented Feb 26, 2026

Deploy Preview for unocss ready!

Name Link
🔨 Latest commit 0928d3e
🔍 Latest deploy log https://app.netlify.com/projects/unocss/deploys/699fdd22b654c60008104d81
😎 Deploy Preview https://deploy-preview-5120--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 project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the base perspective handling in the transform CSS property for the preset-mini package. Previously, perspective(var(--un-perspective)) was included in every transform by default, even when no perspective was set. This PR removes it from the base transform and only includes it when explicitly set via transform-perspective-xxx utilities.

Changes:

  • Removed perspective(var(--un-perspective)) from the base transform string to avoid unnecessary perspective function calls
  • Modified transform-perspective-xxx rule to use var(--un-perspective) directly in the transform property instead of wrapping it in perspective()
  • Updated all test snapshots to reflect the corrected behavior

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages-presets/preset-mini/src/_rules/transform.ts Core fix: removed perspective from base transform array; updated transform-perspective rule to use var directly
test/transformer-compile-class.test.ts Updated test snapshot to remove perspective from base transform
test/cases/preset-attributify/case-4/output.css Updated test snapshot for attributify preset transforms
test/cases/preset-attributify/case-2/output.css Updated test snapshot for peer-state transforms
test/cases/preset-attributify/case-1/output.css Updated test snapshot for basic transforms
test/assets/output/transformer-directives-apply.css Updated test snapshot for apply directive transforms
test/assets/output/transformer-directives-apply-with-important.css Updated test snapshot for apply with important transforms
test/assets/output/preset-wind3-targets.css Updated test snapshot for wind3 preset transforms
test/assets/output/preset-wind3-important-true.css Updated test snapshot for wind3 with important flag
test/assets/output/preset-wind3-important-string.css Updated test snapshot for wind3 with important selector
test/assets/output/preset-wind3-empty-prefix.css Updated test snapshot for wind3 with empty prefix
test/assets/output/preset-wind3-custom-var-prefix.css Updated test snapshot for wind3 with custom var prefix
test/assets/output/preset-mini-targets.css Updated test snapshot for mini preset transforms, including transform-perspective-9cm
test/assets/output/preset-mini-empty-prefix.css Updated test snapshot for mini with empty prefix
test/assets/output/preset-mini-custom-var-prefix.css Updated test snapshot for mini with custom var prefix
test/snapshots/postcss.test.ts.snap Updated postcss test snapshot
packages-integrations/svelte-scoped/src/_preprocess/transformClasses/test-outputs/EverythingProd.svelte Updated svelte production output snapshot
packages-integrations/svelte-scoped/src/_preprocess/transformClasses/test-outputs/EverythingDev.svelte Updated svelte development output snapshot
packages-integrations/runtime/test/assets/output/runtime-preset-tagify.css Updated runtime tagify preset snapshot
packages-engine/core/test/postprocess.test.ts Updated postprocess test snapshot
packages-engine/core/test/assets/output/shortcuts-transform-duplicated.css Updated shortcuts transform test snapshot

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 26, 2026

Open in StackBlitz

commit: 0928d3e

@zyyv zyyv merged commit 7382456 into main Feb 26, 2026
16 checks passed
@zyyv zyyv deleted the mini/revert/transform branch February 26, 2026 05:48
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