Bug 1729777 [wpt PR 30405] - Parsing for contain-intrinsic-size: auto <length>, a...
[gecko.git] / testing / web-platform / tests / css / CSS2 / normal-flow / inline-block-replaced-width-007.xht
blobd7f3297f194192ea0532ccfecdf6ecb1e59f6bd6
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
5   <head>
7   <title>CSS Test: width of inline-block replaced element with no intrinsic height, no intrinsic width and no intrinsic ratio</title>
9   <link rel="author" title="GĂ©rard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
10   <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#inlineblock-replaced-width" />
11   <link rel="match" href="../positioning/absolute-replaced-width-003a-ref.xht" />
13   <meta name="flags" content="nonHTML svg" />
14   <meta name="assert" content="If an inline-block replaced element (like the svg element in this test) has no intrinsic width and no intrinsic height, then the used value of 'width' becomes 300px and the used value of 'height' becomes 150px." />
16   <style type="text/css"><![CDATA[
17   div
18   {
19   height: 225px;
20   width: 450px;
21   }
23   svg#overlapped-red
24   {
25   display: inline-block;
26   vertical-align: top;
27   }
29   div#overlapping-green
30   {
31   background-color: green;
32   bottom: 150px;
33   height: 150px;
34   position: relative;
35   width: 300px;
36   }
37   ]]></style>
39  </head>
41  <body>
43   <p>Test passes if there is a filled green rectangle and <strong>no red</strong>.</p>
45   <div>
46       <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" baseProfile="full" id="overlapped-red">
47           <svg:rect x="0" y="0" width="600" height="300" fill="red" />
48       </svg:svg>
50       <div id="overlapping-green"></div>
51   </div>
53   </body>
54 </html>