Skip to content

fix: update web variant condition#580

Merged
Brentlok merged 1 commit into
mainfrom
fix/web-variant
Jun 11, 2026
Merged

fix: update web variant condition#580
Brentlok merged 1 commit into
mainfrom
fix/web-variant

Conversation

@Brentlok

@Brentlok Brentlok commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Improved the web variant detection mechanism to use more reliable CSS feature detection for consistent application across different environments.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1d97fe3c-3967-4b0b-aec0-899f1e8c4d20

📥 Commits

Reviewing files that changed from the base of the PR and between ceb276d and a837921.

📒 Files selected for processing (3)
  • packages/uniwind/src/bundler/artifacts/css/variants.ts
  • packages/uniwind/src/bundler/css-processor/processor.ts
  • packages/uniwind/uniwind.css

📝 Walkthrough

Walkthrough

The PR replaces the html & selector strategy with @supports selector(div > div) feature detection for the web variant. This involves updating the CSS variant definition, the variant generator, and the CSS processor to handle the new supports-based condition.

Changes

Web variant feature detection migration

Layer / File(s) Summary
Variant generation and processor guard for feature detection
packages/uniwind/src/bundler/artifacts/css/variants.ts, packages/uniwind/src/bundler/css-processor/processor.ts, packages/uniwind/uniwind.css
The web variant generator now produces @supports selector(div > div) as the CSS wrapper condition instead of html &. The processor adds a guard to skip nested rule processing for supports blocks with that exact condition value, preventing double application of the feature-detection rule.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • jpudysz

Poem

🐰 From html & to supports we leap,
Feature-detection secrets to keep,
div > div tells the browser's tale,
Selector guard ensures none will fail! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: updating the web variant's condition from html & to @supports selector(div > div) across multiple files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/web-variant

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Brentlok Brentlok merged commit 6556203 into main Jun 11, 2026
2 checks passed
@Brentlok Brentlok deleted the fix/web-variant branch June 11, 2026 09:10
@github-actions

Copy link
Copy Markdown
Contributor

🚀 This pull request is included in v1.9.0. See Release v1.9.0 for release notes.

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.

1 participant