Skip to content

fix(preset-wind4): generate working containment utilities - #5400

Merged
zyyv merged 1 commit into
unocss:mainfrom
clean99:contrib/wind4-containment-utilities
Oct 29, 2026
Merged

zyyv merged 1 commit into
unocss:mainfrom
clean99:contrib/wind4-containment-utilities

Conversation

@clean99

@clean99 clean99 commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

contain-paint computes to none, so overflowing children remain visible. Wind4 promises Wind3 compatibility, but also drops contain-inline-size.

The containment rule now uses independent variable slots and empty fallbacks, matching Tailwind's containment utilities. Inline-size shares the size slot.

Reverting only rules/static.ts and rebuilding fails six regression cases, including the .contain-paint declaration with its own paint slot and empty fallbacks. Keyword and arbitrary-value controls stay unchanged. The playground now clips the overflowing child.

Checked with pnpm build, pnpm test run (1,142 passed), pnpm lint, and pnpm typecheck.

Fixes #5399

@clean99
clean99 requested review from antfu and zyyv as code owners October 28, 2026 05:32
@netlify

netlify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for unocss ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 5e92450
🔍 Latest deploy log https://app.netlify.com/projects/unocss/deploys/6ae188dcbd8ca018daaca22c
😎 Deploy Preview https://deploy-preview-5400--unocss.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@pkg-pr-new

pkg-pr-new Bot commented Oct 28, 2026

Copy link
Copy Markdown

Open in StackBlitz

commit: 5e92450

@zyyv
zyyv added this pull request to the merge queue Oct 29, 2026
Merged via the queue into unocss:main with commit 1b957cd Oct 29, 2026
11 checks passed
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.

Named containment utilities do not apply containment in preset-wind4

3 participants