First formatted line doubt (::first-line and ::first-letter)

Hi,

I'm checking the following W3C test and I think it's wrong:
https://test.csswg.org/shepherd/testcase/first-line-selector-011/spec/css21/name/first-line-selector-011/

SPAN is inline-block so according to the spec [1], it shouldn't be the
first formatted line of the DIV, so the text should be red.
The actual result varies depending on the browser:
* Internet Explorer and Firefox: Text is green.
* Safari and Chrome: Text is red.

The specific text from the spec:
"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"."

I'm wondering what would be the first formatted line in the spec example
(probably the spec could be updated to be more explicit regarding it).
I think that it should be "etcetera" or none, as P is inline-block and
should be ignored.
Andy thoughts?


On top of that the following test seems wrong too:
https://test.csswg.org/shepherd/testcase/first-line-floats-002/spec/css21/name/first-line-floats-002/

The 2nd SPAN is floated so it seems to me that ::first-line
pseudo-element shouldn't apply and the text should be red.
Again the results are different depending on the browser:
* Firefox: Text is green.
* Internet Explorer, Safari and Chrome: Text is red.

The spec text:
"The "first formatted line" of an element may occur inside a block-level
descendant in the same flow (i.e., a block-level descendant that is not
positioned and not a float)"

What do you think?


Thanks,
  Rego

[1] http://www.w3.org/TR/CSS2/selector.html#pseudo-element-selectors

Received on Sunday, 7 December 2014 13:58:09 UTC