- From: jfkthame via GitHub <sysbot+gh@w3.org>
- Date: Wed, 26 Mar 2025 10:36:19 +0000
- To: public-css-archive@w3.org
jfkthame has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-pseudo] Should `::first-letter` range be terminated by a direction-run boundary? == The range of content targeted by `::first-letter` can include punctuation that precedes the actual initial "letter". However, in the case where the preceding punctuation has different bidi directionality than the letter, and hence may be visually separated from it, does it make sense to have a `::first-letter` range that will be visually fragmented, or should the direction-run boundary forcibly terminate the `::first-letter` range? Example: ``` data:text/html;charset=utf-8,<style>p::first-letter{background:cyan}</style><p>፠שׁלום is Hebrew...</p> ``` Or conversely, with RTL punctuation and LTR text: ``` data:text/html;charset=utf-8,<style>p::first-letter{background:cyan}</style><p dir=rtl>׀Test...</p> ``` Currently, it appears that Gecko never allows `::first-letter` to extend across a direction boundary, while Webkit/Blink do. Should this be clearly specified one way or the other? There are a number of [existing WPT testcases](https://wpt.fyi/results/css/CSS2/selectors?label=master&label=experimental&aligned&q=first-letter-punctuation) that fail in Firefox because of this; however, this collection of tests look like they were simply generated from a list of Unicode codepoints with punctuation properties, and the question of directionality was probably never considered. I don't think they carry much weight in terms of deciding the desired behavior here. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12010 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 26 March 2025 10:36:20 UTC