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-TW]: update CSS ::first-letter pseudo-element #25014

Merged
merged 6 commits into from
Dec 30, 2024
Merged

[zh-TW]: update CSS ::first-letter pseudo-element #25014

merged 6 commits into from
Dec 30, 2024

Conversation

Dr-XYZ
Copy link
Contributor

@Dr-XYZ Dr-XYZ commented Dec 12, 2024

Description

Motivation

Additional details

Related issues and pull requests

@Dr-XYZ Dr-XYZ requested a review from a team as a code owner December 12, 2024 06:33
@Dr-XYZ Dr-XYZ requested review from irvin and removed request for a team December 12, 2024 06:33
@github-actions github-actions bot added the l10n-zh Issues related to Chinese content. label Dec 12, 2024
@Dr-XYZ Dr-XYZ changed the title [zh-TW]: Update CSS/::first-letter [zh-TW]: update CSS/::first-letter Dec 12, 2024
Copy link
Contributor

github-actions bot commented Dec 12, 2024

Preview URLs

Flaws (58)

URL: /zh-TW/docs/Web/CSS/::first-letter
Title: ::first-letter
Flaw count: 58

  • macros:
    • /zh-TW/docs/Web/CSS/::before does not exist but fell back to /en-US/docs/Web/CSS/::before
    • /zh-TW/docs/Web/CSS/content does not exist but fell back to /en-US/docs/Web/CSS/content
    • /zh-TW/docs/Web/CSS/font does not exist but fell back to /en-US/docs/Web/CSS/font
    • /zh-TW/docs/Web/CSS/font-style does not exist but fell back to /en-US/docs/Web/CSS/font-style
    • /zh-TW/docs/Web/CSS/font-feature-settings does not exist but fell back to /en-US/docs/Web/CSS/font-feature-settings
    • and 52 more flaws omitted
  • translation_differences:
    • Differences in the important macros (4 in common of 10 possible)

(comment last updated: 2024-12-30 09:26:24)

@Dr-XYZ
Copy link
Contributor Author

Dr-XYZ commented Dec 12, 2024

#13196

@github-actions github-actions bot added the merge conflicts 🚧 This pull request has merge conflicts that must be resolved. label Dec 13, 2024
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot removed the merge conflicts 🚧 This pull request has merge conflicts that must be resolved. label Dec 16, 2024
@yin1999 yin1999 changed the title [zh-TW]: update CSS/::first-letter [zh-TW]: update CSS ::first-letter pseudo-element Dec 27, 2024
- Punctuation, that is any characters defined in Unicode in the _open_ (Ps), _close_ (Pe), _initial quote_ (Pi), _final quote_ (Pf) and _other punctuation_ (Po) classes, preceding or immediately following the first letter is also matched by this pseudo-element.
- Similarly some languages have digraphs that are always capitalized together, like the `IJ` in Dutch. In these rare cases, both letters of the digraph should be matched by the `::first-letter` pseudo-element. (This is poorly supported by browsers, check the [browser compatibility table](/zh-TW/docs/Web/CSS/::first-letter#%e7%80%8f%e8%a6%bd%e5%99%a8%e7%9b%b8%e5%ae%b9%e6%80%a7)).
- Finally, a combination of the {{ cssxref("::before") }} pseudo-element and the {{ cssxref("content") }} property may inject some text at the beginning of the element. In that case, `::first-letter` will match the first letter of this generated content.
- 在第一個字母前後的標點符號會被包含在匹配中。標點符號包括任何 Unicode 字符,這些字符定義在*右括號*(Ps)、_左括號_(Pe)、_起始引號_(Pi)、_結束引號_(Pf)和*其他標點符號*(Po)類別中。
Copy link
Member

Choose a reason for hiding this comment

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

可以看一下规范文件Unicode 分类,这里绝不指“右括号”和“左括号”

- 所有背景屬性:{{ Cssxref("background") }}、{{ Cssxref("background-color") }}、{{ Cssxref("background-image") }}、{{cssxref("background-clip")}}、{{cssxref("background-origin")}}、{{ Cssxref("background-position") }}、{{ Cssxref("background-repeat") }}、{{ cssxref("background-size") }}、{{ Cssxref("background-attachment") }}、和 {{cssxref("background-blend-mode")}}
- 所有邊距屬性:{{ Cssxref("margin") }}、{{ Cssxref("margin-top") }}、{{ Cssxref("margin-right") }}、{{ Cssxref("margin-bottom") }}、{{ Cssxref("margin-left") }}
- 所有內邊距屬性:{{ Cssxref("padding") }}、{{ Cssxref("padding-top") }}、{{ Cssxref("padding-right") }}、{{ Cssxref("padding-bottom") }}、{{ Cssxref("padding-left") }}
- 所有邊框屬性:簡寫形式 {{ Cssxref("border") }}、{{ Cssxref("border-style") }}、{{ Cssxref("border-color") }}、{{ cssxref("border-width") }}、{{ cssxref("border-radius") }}、{{cssxref("border-image")}}、以及長寫形式的屬性
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- 所有邊框屬性:簡寫形式 {{ Cssxref("border") }}、{{ Cssxref("border-style") }}、{{ Cssxref("border-color") }}、{{ cssxref("border-width") }}、{{ cssxref("border-radius") }}、{{cssxref("border-image")}}以及長寫形式的屬性
- 所有邊框屬性:簡寫形式 {{ Cssxref("border") }}、{{ Cssxref("border-style") }}、{{ Cssxref("border-color") }}、{{ cssxref("border-width") }}、{{ cssxref("border-radius") }}、{{cssxref("border-image")}}以及長寫形式的屬性

在這個例子中,我們使用 `::first-letter` 偽元素來設定 SVG {{SVGElement("text")}} 元素中的首字母樣式。

> [!NOTE]
> 寫作時,這項功能的[支持有限](#瀏覽器相容性)。
Copy link
Member

Choose a reason for hiding this comment

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

考虑要不要写成“截至写作时”,语义会更明确一点

@Dr-XYZ Dr-XYZ requested a review from yin1999 December 30, 2024 09:27
@yin1999 yin1999 merged commit 69a6abf into mdn:main Dec 30, 2024
7 checks passed
@Dr-XYZ Dr-XYZ deleted the d branch December 31, 2024 08:46
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
Development

Successfully merging this pull request may close these issues.

2 participants