W3C home > Mailing lists > Public > public-css-testsuite@w3.org > June 2013

Re: [CSS2] first-line-selector-011.htm

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Wed, 5 Jun 2013 11:43:47 -0400
Message-ID: <d4b071508ef97733c1a6999c6f4525b1.squirrel@ed-sh-cp3.entirelydigital.com>
To: "Masataka Yakura" <myakura.web@gmail.com>
Cc: "Public CSS Test suite mailing list" <public-css-testsuite@w3.org>

Le Mer 5 juin 2013 2:50, Masataka Yakura a écrit :
> Hello,
>
> Looking at first-line-selector-011 I get confused.
> http://test.csswg.org/suites/css2.1/latest//first-line-selector-011.htm<http://test.csswg.org/suites/css2.1/latest/html4/first-line-selector-011.htm>



[RC6]
http://test.csswg.org/suites/css2.1/20110323/html4/first-line-selector-011.htm

[nightly-unstable]
http://test.csswg.org/suites/css2.1/nightly-unstable/html4/first-line-selector-011.htm

On the same topic, there is also

[RC6]
http://test.csswg.org/suites/css2.1/20110323/html4/first-line-selector-016.htm

[nightly-unstable]
http://test.csswg.org/suites/css2.1/nightly-unstable/html4/first-line-selector-016.htm



> The spec says "The first line of an inline-block cannot be the first
> formatted line of an ancestor element", so the first "Test" in the
> <span>
> element cannot be the first formatted line because it has `display:
> inline-
> block` set. Hence, div:first-line { color: green } does not apply to the
> <span> and it should show red.
>
> However, the test says it "passes if there is no red visible on the
> page."
> That's wrong, isn't it? It should either say "there is no green
> visible",
> or switch the colors in the stylesheet.
>
> Why I'm confused is that both Gecko and Presto "passes" the test. They
> show
> green. Which one is wrong; those two engines, or the spec?
>
> Best regards,
> --
> Masataka Yakura


I'll try to explain.

"inline-block
    This value causes an element to generate an inline-level block
container. The inside of an inline-block is formatted as a block
box, and the element itself is formatted as an atomic inline-level
box."
http://www.w3.org/TR/CSS21/visuren.html#display-prop

The inline-block itself (as a whole) participates in the inline
formatting context. But its content, its inside creates a block
formatting context, its inside contains block elements.

I strongly believe that the current first-line-selector-011.htm test is
not best coded to verify the purpose of the test. I believe

http://www.gtalbot.org/BrowserBugsSection/css21testsuite/first-line-selector-011-GT.html

is better. We've discussed before the sort of minimal code for
inline-blocks (realistically designed) and it should be something like:

http://www.gtalbot.org/BrowserBugsSection/css21testsuite/inline-block-minimal-code-2.html

I also checked

[RC6]
http://test.csswg.org/suites/css2.1/20110323/html4/first-line-selector-013.htm

[nightly-unstable]
http://test.csswg.org/suites/css2.1/nightly-unstable/html4/first-line-selector-013.htm

and this time the test seems incorrect; I think such test can not fail.

I will propose

http://www.gtalbot.org/BrowserBugsSection/css21testsuite/first-line-selector-013-GT.html

as a replacement. Firefox 21 and Opera 12.15 fails this test while they
both pass
http://test.csswg.org/suites/css2.1/20110323/html4/first-line-selector-013.htm

I also note that inline-table versus applicability of first-line
selector has not been tested.

Gérard
-- 
Contributions to the CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

CSS 2.1 Test suite RC6, March 23rd 2011:
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

CSS 2.1 test suite harness:
http://test.csswg.org/harness/

Contributing to to CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html
Received on Wednesday, 5 June 2013 15:44:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:27:00 UTC