summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css/heightless-list-item.html
blob: e031fe8e803b07d4517c09ffb86ff06559520488 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!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>