blob: e031fe8e803b07d4517c09ffb86ff06559520488 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>CSS Test: height set to 0 to elements with 'display' set to 'list-item'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="author" title="Boris Zbarsky" href="bzbarsky@MIT.EDU">
<link rel="bookmark" title="Interesting testcase that some UAs appear to fail" href="http://lists.w3.org/Archives/Public/public-css-testsuite/2012Feb/0028.html">
<link rel="help" title="10.5 Content height: the 'height' property" href="http://www.w3.org/TR/CSS21/visudet.html#the-height-property">
<meta content="" name="flags">
<meta content="If height of content exceeds the set height of a block-level non-replaced element in normal flow (like a list-item element such as in this test), then the content should overflow according to the 'overflow' property." name="assert">
<!-- Adapted margin-top values to allow compensating values for height of 1px in the reference result-->
<style type="text/css">
#heightzerolistitem
{
color: green;
display: list-item;
font: 2em/1 serif;
height: 0px;
margin-left: 1.25em;
overflow: visible;
margin-top: 1px;
}
ul
{
height: auto;
margin-top: 30px;
overflow: visible;
}
li
{
color: green;
font: 2em/1 serif;
height: 0px;
overflow: visible;
margin-top: 1px;
}
li#yhidden { overflow-y:hidden; }
li#xhidden { overflow-x:hidden; }
ul#heightless { height: 0px; }
</style>
</head>
<body>
<p>Test passes if <strong>5 green "PASS"</strong> are each preceded by a filled disc.</p>
<!--Inline content in div with display: list-item, overflow: visible and height:0 gets painted-->
<div id="heightzerolistitem">PASS</div>
<!--Inline content in list-item with overflow: visible and height:0 gets painted-->
<ul>
<li>PASS</li>
</ul>
<!--Inline content in list-item and list-item parent with overflow: visible and height:0 gets painted-->
<ul id="heightless">
<li>PASS</li>
</ul>
<!--Block content in div with display: list-item, overflow: visible and height:0 gets painted-->
<div id="heightzerolistitem" style="margin-top: 60px;"><div>PASS</div></div>
<!--Block content in list-item with overflow: visible and height:0 gets painted-->
<ul>
<li><div>PASS</div></li>
</ul>
<!--Inline content in div with display: list-item, overflow-y: hidden and height:0 does not get painted-->
<div id="heightzerolistitem" style="overflow-y:hidden;">PASS</div>
<!--Inline content in list-item with overflow-y: hidden and height:0 does not get painted-->
<ul>
<li id="yhidden">PASS</li>
</ul>
<!--Block content in list-item with overflow-y: hidden and height:0 does not get painted-->
<ul>
<li id="yhidden"><div>PASS</div></li>
</ul>
<!--Inline content in div with display: list-item, overflow-x: hidden and height:0 does not get painted-->
<div id="heightzerolistitem" style="overflow-x:hidden;">PASS</div>
<!--Inline content in list-item with overflow-x: hidden and height:0 does not get painted-->
<ul>
<li id="xhidden">PASS</li>
</ul>
<!--Block content in list-item with overflow-x: hidden and height:0 does not get painted-->
<ul>
<li id="xhidden"><div>PASS</div></li>
</ul>
</body>
</html>