Skip to content
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

zh-CN: Translate "CSS Containment" #12810

Merged
merged 3 commits into from
Apr 19, 2023
Merged

zh-CN: Translate "CSS Containment" #12810

merged 3 commits into from
Apr 19, 2023

Conversation

yarusome
Copy link
Contributor

Description

Motivation

Additional details

Related issues and pull requests

@github-actions github-actions bot added the l10n-zh Issues related to Chinese content. label Apr 18, 2023
@yarusome yarusome changed the title Translate "CSS Containment" zh-CN: Translate "CSS Containment" Apr 18, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 18, 2023

Preview URLs

Flaws (2)

URL: /zh-CN/docs/Web/CSS/CSS_Containment
Title: CSS Containment
Flaw count: 2

  • macros:
    • /zh-CN/docs/Web/CSS/counter-set does not exist but fell back to /en-US/docs/Web/CSS/counter-set
  • broken_links:
    • Can use the English (en-US) link as a fallback
External URLs (3)

URL: /zh-CN/docs/Web/CSS/CSS_Containment
Title: CSS Containment

(comment last updated: 2023-04-19 11:55:44)

Despite the name, style containment does not provide scoped styles such as you would get with the [Shadow DOM](/zh-CN/docs/Web/API/Web_components/Using_shadow_DOM). The main use case is to prevent situations where a [CSS Counter](/zh-CN/docs/Web/CSS/CSS_Lists_and_Counters/Using_CSS_counters) could be changed in an element, which could then affect the rest of the tree.

Using `contain: style` would ensure that the {{cssxref("counter-increment")}} and {{cssxref("counter-set")}} properties created new counters scoped to that subtree only.
尽管名称如此,但是样式局限不提供如由 [Shadow DOM](/zh-CN/docs/Web/API/Web_components/Using_shadow_DOM) 可得的域限样式。其主要用途为防止 [CSS 计数器](/zh-CN/docs/Web/CSS/CSS_Counter_Styles/Using_CSS_counters)可在元素中被更改的情形出现,此情形可影响树的其余部分。
Copy link
Contributor Author

Choose a reason for hiding this comment

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

scoped 作形容词译为“作用域受限(的)”,此处作定语简化为“域限(的) ”。

Copy link
Member

Choose a reason for hiding this comment

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

可以注上英文吗

@yarusome yarusome marked this pull request as ready for review April 18, 2023 03:34
@yarusome yarusome requested a review from a team as a code owner April 18, 2023 03:35
@yarusome yarusome requested review from t7yang and removed request for a team April 18, 2023 03:35
files/zh-cn/web/css/css_containment/index.md Outdated Show resolved Hide resolved
Despite the name, style containment does not provide scoped styles such as you would get with the [Shadow DOM](/zh-CN/docs/Web/API/Web_components/Using_shadow_DOM). The main use case is to prevent situations where a [CSS Counter](/zh-CN/docs/Web/CSS/CSS_Lists_and_Counters/Using_CSS_counters) could be changed in an element, which could then affect the rest of the tree.

Using `contain: style` would ensure that the {{cssxref("counter-increment")}} and {{cssxref("counter-set")}} properties created new counters scoped to that subtree only.
尽管名称如此,但是样式局限不提供如由 [Shadow DOM](/zh-CN/docs/Web/API/Web_components/Using_shadow_DOM) 可得的域限样式。其主要用途为防止 [CSS 计数器](/zh-CN/docs/Web/CSS/CSS_Counter_Styles/Using_CSS_counters)可在元素中被更改的情形出现,此情形可影响树的其余部分。
Copy link
Member

Choose a reason for hiding this comment

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

可以注上英文吗

@yin1999 yin1999 removed the request for review from t7yang April 19, 2023 01:37
yarusome and others added 2 commits April 19, 2023 19:46
Co-authored-by: A1lo <yin199909@aliyun.com>
@yarusome yarusome requested a review from yin1999 April 19, 2023 11:53
Copy link
Member

@yin1999 yin1999 left a comment

Choose a reason for hiding this comment

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

Thanks

@yin1999 yin1999 merged commit 5717ca7 into mdn:main Apr 19, 2023
@yarusome yarusome deleted the css-containment branch April 19, 2023 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
l10n-zh Issues related to Chinese content.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants