max-height-applies-to-016

Max-Height applied to none

WeasyPrint

This browser

Assertion
Max-Height can be applied to none elements.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3     <head>
 4         <title>CSS Test: Max-Height applied to none</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-heights">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="Max-Height can be applied to none elements.">
 9         <style type="text/css">
10             div
11             {
12                 width: 100px;
13                 height: 100px;
14                 background: green;
15             }
16             span
17             {
18                 display: none;
19                 width: 100px;
20                 max-height: 100px;
21                 height: 1000px;
22                 background-color: red;
23             }
24         </style>
25     </head>
26     <body>
27         <p>Test passes if a green box is visible and there is no red visible on the page.</p>
28         <div>
29             <span></span>
30         </div>
31     </body>
32 </html>