-
Notifications
You must be signed in to change notification settings - Fork 8.3k
[zh-cn] update css attr() docs
#30534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
|
Preview URLs Flaws (46)URL:
External URLs (1)URL:
(comment last updated: 2025-11-20 00:55:57) |
yin1999
requested changes
Nov 17, 2025
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Contributor
Author
|
@yin1999 已根据英文文档进行修改,烦请复核。 |
yin1999
reviewed
Nov 18, 2025
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
yin1999
approved these changes
Nov 20, 2025
Member
|
@InkSha 欢迎来到 MDN 社区 🎉 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
对 CSS
attr()的中文文档进行了更新与修订,补充了被遗漏的规范细节。主要包括:<attr-type>的类型取值说明。<fallback-value>的完整行为(包括允许 fallback 使用非同类值,例如auto)。type(<url>)的安全限制。Motivation
当前中文文档在多个技术细节上与最新规范 不一致,且缺少部分关键说明。
此次更新可确保读者获得与规范同步且更完整的参考资料,避免对
attr()行为产生误解。Additional details
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/attr
https://drafts.csswg.org/css-values-5/#attr-notation
Related issues and pull requests