[csswg-drafts] [css-pseudo] Clarify spec text in "Finding the First Formatted Line" section

mrego has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-pseudo] Clarify spec text in "Finding the First Formatted Line" section ==
Spec: https://drafts.csswg.org/css-pseudo/#first-text-line

The spec says:
> The first line of a table-cell or inline-block cannot be the first formatted line of an ancestor element. Thus, in `<DIV><P STYLE="display: inline-block">Hello<BR>Goodbye</P> etcetera</DIV>` the first formatted line of the `DIV` is not the line "Hello".

It'd be nice to clarify what the *first line* is in that example. It only says that it's not the line "Hello", but what about the line "Goodbye etcetera" or only the word "etcetera".
Also there's no browser interoperability if you add for example:
```html
<style>div::first-line { color: cyan; background: magenta; }</style>
```

![Output in Chromium/WebKit vs Firefox/Edge](https://user-images.githubusercontent.com/11602/34170796-92edb294-e4ec-11e7-896b-1342c329b813.png)

All browsers do weird things. :smile: 

For example for `first-letter` the text is clearer:
> In CSS the first letter of a table-cell or inline-block cannot be the first letter of an ancestor element. Thus, in `<DIV><P STYLE="display: inline-block">Hello<BR>Goodbye</P> etcetera</DIV>` the first letter of the `DIV` is not the letter "H". In fact, the `DIV` doesn’t have a first letter.

It says that it's not the "H" and that there's no *first letter* in that example. So things are 100% clear.


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2120 using your GitHub account

Received on Tuesday, 19 December 2017 17:47:17 UTC