[RC6] line-height-applies-to-016 incorrect

Arron,

[RC6]
http://test.csswg.org/suites/css2.1/20110323/html4/line-height-applies-to-016.htm

[nightly-unstable]
http://test.csswg.org/suites/css2.1/nightly-unstable/html4/line-height-applies-to-016.htm

I do not understand the test assert, the code involved and the building
logic of the test.

<meta name="assert" content="The 'line-height' property applies to
elements with 'display' set to 'none'.">

If there is no box created, then how does line-height apply or can apply
then?

'display: none' is said to have no effect on layout
http://www.w3.org/TR/CSS21/visuren.html#display-prop


            div
            {
                background-color: green;
                color: green;
                height: 100px;
                margin: 100px;
                width: 100px;
            }


If line-height of the child div has to have an effect on layout, then
setting an height and a width on its parent is not needed, not required
for the test.


            div div
            {
                background-color: red;
                display: none;
                font-size: 72pt;
                line-height: 100px;
            }

If line-height of the child is supposed to have an effect on layout,
then setting a font-size is not needed for the test. The font-size is
independent from a set line-height. As I understand this, there is no
need to set a font-size in the test... that is if line-height set on an
element set with 'display: none' element is supposed to have an effect
on layout.

------------

Personally, I would have coded the following for the test:

<meta name="assert" content="The 'line-height' property can be set on an
element with 'display' set to 'none' but then, in such case, the
line-height declaration will have no impact, no effect on layout since
no line box is generated.">

div
{
background-color: red;
color: red;
display: none;
line-height: 100px;
}

(...)

<p>Test passes if there is <strong>no red</strong>.</p>

<div>Filler text</div>

See such example:

http://www.gtalbot.org/BrowserBugsSection/css21testsuite/line-height-applies-to-016.html

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/

Received on Thursday, 22 September 2011 18:09:42 UTC