-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Conversation
Preview URLs Flaws (58)URL:
(comment last updated: 2024-12-30 09:26:24) |
This pull request has merge conflicts that must be resolved before it can be merged. |
::first-letter
pseudo-element
- 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)類別中。 |
There was a problem hiding this comment.
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")}}、以及長寫形式的屬性 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 所有邊框屬性:簡寫形式 {{ 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] | ||
> 寫作時,這項功能的[支持有限](#瀏覽器相容性)。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
考虑要不要写成“截至写作时”,语义会更明确一点
Description
Motivation
Additional details
Related issues and pull requests