W3C home > Mailing lists > Public > public-css-testsuite@w3.org > September 2011

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

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Thu, 22 Sep 2011 11:08:38 -0700
Message-ID: <ffbde77dd75eb6e9b574e9ecc67c1e2b.squirrel@cp3.shieldhost.com>
To: "Arron Eicholz" <arron.eicholz@microsoft.com>
Cc: "Public CSS test suite mailing list" <public-css-testsuite@w3.org>



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

'display: none' is said to have no effect on layout

                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.">

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:


Contributions to the CSS 2.1 test suite:

CSS 2.1 Test suite RC6, March 23rd 2011

CSS 2.1 test suite harness:
Received on Thursday, 22 September 2011 18:09:42 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:13:23 UTC