Skip to content

chore: rm @-ms-viewport#55108

Merged
meet-student merged 2 commits intonextfrom
rm-noUnknownAtRules
Sep 22, 2025
Merged

chore: rm @-ms-viewport#55108
meet-student merged 2 commits intonextfrom
rm-noUnknownAtRules

Conversation

@thinkasany
Copy link
Copy Markdown
Member

🤔 This is a ...

  • ❓ Other (about what?)

💡 Background and Solution

https://developer.mozilla.org/zh-CN/docs/Web/CSS/CSS_syntax/At-rule

components/style/reset.css:24:2 lint/suspicious/noUnknownAtRules ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✖ Unexpected unknown at-rule: -ms-viewport

    22 │   -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    23 │ }
  > 24 │ @-ms-viewport {
       │  ^^^^^^^^^^^^
    25 │   width: device-width;
    26 │ }

  ℹ -ms-viewport is not a standard CSS at-rule, which may lead to unexpected styling results or failure to interpret the styles as intended.   

  ℹ See MDN web docs for a known list of at-rules.

  ℹ To fix this issue, consider removing the unknown at-rule.


Checked 2668 files in 695ms. No fixes applied.
Found 1 error.
check ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✖ Some errors were emitted while applying fixes.
image

📝 Change Log

Language Changelog
🇺🇸 English -
🇨🇳 Chinese -

@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Sep 21, 2025

Deploying ant-design-next with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4236fa5
Status: ✅  Deploy successful!
Preview URL: https://efa0b4c4.ant-design-next.pages.dev
Branch Preview URL: https://rm-nounknownatrules.ant-design-next.pages.dev

View logs

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Sep 21, 2025

👁 Visual Regression Report for PR #55108 Failed ❌

🎯 Target branch: next (2ab823d)
📖 View Full Report ↗︎
📖 Alternative Report ↗︎
📊 Summary: 🔄 2 changed

Expected (Branch next) Actual (Current PR) Diff
list-vertical.dark.png list-vertical.dark.png list-vertical.dark.png list-vertical.dark.png
table-sticky.default.png table-sticky.default.png table-sticky.default.png table-sticky.default.png

Important

There are 2 diffs found in this PR: 🔄 2 changed.
Please check all items:

  • Visual diff is acceptable

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Sep 21, 2025

📝 Walkthrough

Summary by CodeRabbit

  • 样式

    • 移除过时的 IE 专用视口规则;现代浏览器表现不变,部分旧版 IE 不再强制 device-width,可能轻微影响其布局。
  • 杂务

    • 精简代码质量检查配置,删除冗余的禁用项,保持其余规则不变。

Walkthrough

本次变更移除了 biome.json 中 suspicious 规则里的 noUnknownAtRules: off 配置,并在 CSS 重置中删除了 IE 专用的 @-ms-viewport 规则;其余配置与样式未改动。

Changes

Cohort / File(s) Change Summary
Linter 配置精简
biome.json
删除 linter.rules.suspicious.noUnknownAtRules: off;保留 useIterableCallbackReturn: off
CSS Reset 调整
components/style/reset.css
移除 @-ms-viewport { width: device-width; }(IE 专用);其他样式不变。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

skip-verify-files, lgtm

Suggested reviewers

  • afc163
  • li-jia-nan

Poem

小兔拍耳听风吟,
规约微调更分明。
旧日 IE 轻别过,
栈上代码少回声。
跳跃一笔春草绿,
提交即是好心情。 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed 标题 "chore: rm @-ms-viewport" 简洁且明确,直接反映了 changeset 中移除 components/style/reset.css 中 @-ms-viewport 的主要改动,便于审阅历史识别该变更。
Description Check ✅ Passed PR 描述包含 lint 报错信息、相关代码片段、MDN 链接和截图,具体说明了变更原因与位置,因此与 changeset 相关并满足基本要求。
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch rm-noUnknownAtRules

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f1036be and ee782e4.

📒 Files selected for processing (2)
  • biome.json (1 hunks)
  • components/style/reset.css (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (16)
  • GitHub Check: test lib/es module (es, 1/2)
  • GitHub Check: test lib/es module (es, 2/2)
  • GitHub Check: build
  • GitHub Check: test-react-legacy (17, 2/2)
  • GitHub Check: test-react-latest (dom, 1/2)
  • GitHub Check: test-react-legacy (17, 1/2)
  • GitHub Check: test-react-latest (dom, 2/2)
  • GitHub Check: test-react-legacy (16, 2/2)
  • GitHub Check: test-react-legacy (16, 1/2)
  • GitHub Check: lint
  • GitHub Check: build preview
  • GitHub Check: visual-diff snapshot (1/2)
  • GitHub Check: visual-diff snapshot (2/2)
  • GitHub Check: build
  • GitHub Check: size
  • GitHub Check: Cloudflare Pages: ant-design-next
🔇 Additional comments (2)
components/style/reset.css (1)

24-24: 移除 @-ms-viewport

该 at‑rule 仅作用于早已退场的 IE/Windows Phone 浏览器,删除后对当前支持矩阵不会产生负面影响,同时消除了 noUnknownAtRules 的告警。

顺带建议在本 PR 的 Change Log 填写一行“移除 IE 专用 @-ms-viewport,遵循规范 at‑rule”,便于追溯。

biome.json (1)

68-68: 开启 noUnknownAtRules 的方向正确;需要全仓库排查非标准 at‑rule(biome.json 行 68)

我在沙箱运行你给出的检测脚本但未得到任何输出,无法确认仓库中是否仍有非标准 at‑rule。请在本地再次运行脚本并把输出粘贴过来,或允许我重试并运行更宽泛的搜索。


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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Sep 21, 2025

Preview is ready

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Sep 21, 2025

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4236fa5
Status: ✅  Deploy successful!
Preview URL: https://78a159ff.ant-design.pages.dev
Branch Preview URL: https://rm-nounknownatrules.ant-design.pages.dev

View logs

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @thinkasany, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on code quality and maintenance by resolving a linting error related to an unknown CSS at-rule. It removes the @-ms-viewport rule, which is a non-standard and deprecated feature, from the project's reset.css file. Concurrently, the Biome linter configuration is updated to no longer ignore this specific rule, ensuring future adherence to standard CSS practices.

Highlights

  • Linting Error Resolution: This pull request addresses and resolves a lint/suspicious/noUnknownAtRules error reported by Biome.
  • CSS Cleanup: The deprecated and non-standard @-ms-viewport CSS at-rule has been removed from components/style/reset.css.
  • Biome Configuration Update: The biome.json configuration has been updated to remove the explicit disabling of the noUnknownAtRules lint rule, allowing it to enforce standard CSS practices.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai coderabbitai Bot requested review from afc163 and li-jia-nan September 21, 2025 03:46
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly removes the obsolete @-ms-viewport CSS at-rule and enables the corresponding noUnknownAtRules lint rule in the Biome configuration. This is a good cleanup that improves code quality and consistency. I have one minor suggestion regarding the formatting in the CSS file.

@-ms-viewport {
width: device-width;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

This change introduces a blank line. However, the prevailing style in this file is to not have blank lines between CSS rule blocks. To maintain a consistent style, it would be better to remove this empty line.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Sep 21, 2025

size-limit report 📦

Path Size
dist/antd.min.js 497.35 KB
dist/antd-with-locales.min.js 588.98 KB

@coderabbitai coderabbitai Bot added lgtm This PR has been approved by a maintainer skip-verify-files labels Sep 21, 2025
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Sep 21, 2025

@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 21, 2025

Bundle Report

Changes will decrease total bundle size by 7.91MB (-67.85%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antd.min-array-push 3.75MB -7.91MB (-67.85%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: antd.min-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
antd-with-locales.min.js (New) 2.06MB 2.06MB 100.0% 🚀
antd.min.js (New) 1.69MB 1.69MB 100.0% 🚀
antd-with-locales.js (Deleted) -6.13MB 0 bytes -100.0% 🗑️
antd.js (Deleted) -5.53MB 0 bytes -100.0% 🗑️

@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (2ab823d) to head (4236fa5).
⚠️ Report is 1 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff            @@
##              next    #55108   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          793       793           
  Lines        14642     14642           
  Branches      3891      3891           
=========================================
  Hits         14642     14642           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

-ms-overflow-style: scrollbar;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
@-ms-viewport {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

这个删了不确定会不会影响到用户,让 @afc163 @zombieJ 老师们确认一下吧

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

嗯,所以这个没催你 +1,这个先挂起好了。

看起来用户想 reset 应该

<meta name="viewport" content="width=device-width, initial-scale=1.0">

标准一点

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

感觉可以放在 v6,万一有 breaking change

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

周一看看佬们怎么说吧,看起来这个也确实废弃很久了。如果保守一点的话,我到时候把这个 PR 改到 next 分支上。

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

放 next 分支吧,v6 明确不支持 IE

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1, next 更适合

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done,求个 +1

@thinkasany thinkasany changed the base branch from master to next September 22, 2025 13:21
@meet-student meet-student merged commit 63e212a into next Sep 22, 2025
44 of 46 checks passed
@meet-student meet-student deleted the rm-noUnknownAtRules branch September 22, 2025 13:46
@zombieJ zombieJ mentioned this pull request Nov 4, 2025
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer skip-verify-files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants