Re: [csswg-drafts] [css-inline][css-text][css-pseudo] Define more details of the "first formatted line" (#10990)

Note that for `text-indent`, the property is inherited, and the value applying to a given line is the value specified by its containing block. The spec's reference to "first formatted line" is to say that, among the lines to which it applies, first-line behavior only applies to lines that are also the first formatted line _of an element_ (not an anonymous block).

For `::first-line` and nested content ([testcase](https://www.software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cstyle%3E%0Adiv%3A%3Afirst-line%20%7B%20background%3A%20yellow%3B%20%7D%0A%3C%2Fstyle%3E%0A%3Cdiv%3E%0A%20%20%3Cp%3ETest%20this%0A%3C%2Fdiv%3E)) this seems like a very clear Gecko bug. The specs have been very clear about this [since CSS2](https://www.w3.org/TR/CSS2/selector.html#first-line-pseudo) and [there were tests](http://test.csswg.org/suites/css21_dev/20110323/html4/first-line-selector-004.htm) although it seems [Gecko never passed them](https://www.w3.org/Style/CSS/Test/CSS2.1/20110323/reports/details_gecko.html).

For `::first-line` and "empty anonymous block before nested content"; that anonymous block isn't empty (or else it wouldn't exist); but since it contains only an empty unstyled inline, the phantom line box clause applies. See [CSS2](https://www.w3.org/TR/CSS2/visuren.html#phantom-line-box) and [CSS Inline Layout L3](https://www.w3.org/TR/css-inline-3/#invisible-line-boxes).

I think the specs are clear here, but lmk if anything seems wrong.

-- 
GitHub Notification of comment by fantasai
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10990#issuecomment-2388434824 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 2 October 2024 11:40:45 UTC