Skip to content

Conversation

@kimteayon
Copy link
Contributor

修复当 css 的 content 为 cssvar时 的报错问题:
image

@coderabbitai
Copy link

coderabbitai bot commented Oct 30, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@gemini-code-assist
Copy link

Summary of Changes

Hello @kimteayon, 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!

此拉取请求修复了CSS Linter中的一个错误,该错误导致使用CSS变量的 content 属性值被错误地标记为无效。通过此更改,Linter将能够正确识别CSS变量语法,从而防止误报验证错误,并提高Linter对现代CSS实践的准确性。

Highlights

  • 修复CSS content 属性验证问题: 解决了当CSS content 属性的值为CSS变量(例如 var(--my-var))时,验证失败的错误。
  • 更新 contentQuotesLinter.ts: 在 src/linters/contentQuotesLinter.ts 中添加了一个新的正则表达式 !/^var\(--[a-zA-Z0-9_-]+\)$/.test(${value}),以正确识别和允许 content 属性中的CSS变量语法。
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
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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.

@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.53%. Comparing base (02d35a3) to head (4324dbb).
⚠️ Report is 1 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next     #235   +/-   ##
=======================================
  Coverage   94.53%   94.53%           
=======================================
  Files          32       32           
  Lines        2817     2818    +1     
  Branches      444      445    +1     
=======================================
+ Hits         2663     2664    +1     
  Misses        154      154           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@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

本次 PR 修复了当 CSS content 属性值为 CSS 变量时,linter 错误报警的问题。修改是有效的,但我建议对正则表达式进行改进,使其更严格地遵循 CSS 自定义属性的命名规范,并移除一处多余的模板字符串用法。这将提高代码的健壮性和可读性。

@kimteayon kimteayon requested a review from zombieJ October 31, 2025 02:52
@zombieJ zombieJ merged commit c6283f7 into ant-design:next Oct 31, 2025
8 checks passed
@MadCcc MadCcc mentioned this pull request Nov 17, 2025
MadCcc added a commit that referenced this pull request Nov 17, 2025
* feat: remove compatibility under React v18 (#210)

* 2.0.0-alpha.0

* 2.0.0-alpha.2

* feat: rm style tokenKey (#213)

* feat: rm style tokenKey

* test: fix test cases

* chore: fix tsc

* feat: remove wrapSSR

* docs: update examples

* feat: css var support hash (#214)

* feat: css var support hash

* chore: remove useless comment

* chore: fix tsc

* test: add test case

* chore: rm only

* chore: add useMemo back (#215)

* docs: add first render demo (#216)

* 2.0.0-alpha.3

* fix: should not clean token when token change (#217)

* 2.0.0-alpha.4

* perf: cache effect (#218)

* chore: bump father-plugin (#219)

* chore: bump version to 2.0.0-alpha.5

* fix: Keep render order in ssr (#225)

* chore: record updateTime

* test: add test case

* chore: bump father version

* chore: bump version to 2.0.0-alpha.6

* feat: extractStyle support once (#228)

* feat: support autoPrefix (#230)

* chore: bump version to 2.0.0-alpha.7

* fix: not use func of autoPrefix

* chore: fix lint

* chore: bump version to 2.0.0-alpha.8

* fix: fix the issue of failed verification when content is cssvar (#235)

* fix: content

* fix: content

* feat: 更新文档

* feat: 更新文档

* feat: 更新测试用例

* feat: 更新测试用例

* chore: fix lint

* chore: bump version to 2.0.0-alpha.9

* test: update test case

---------

Co-authored-by: 二货爱吃白萝卜 <smith3816@gmail.com>
Co-authored-by: Mickey <951203214@qq.com>
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