Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-009.xht

Issue 2824603002: Import css21/positioning W3C CSS Test Suite (Closed)
Patch Set: git rebase-update Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/x html1/DTD/xhtml1-strict.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <title>CSS Test: Absolutely positioned, non-replaced elements, height is based on the content</title>
5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
6 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtal bot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-01 -->
7 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-r eplaced-height" />
8 <link rel="match" href="absolute-non-replaced-height-009-ref.xht " />
9
10 <meta name="flags" content="ahem" />
11 <meta name="assert" content="The 'height' is based on the content height , 'auto' values for 'margin-top' and 'margin-bottom' are set to '0' when 'height ' and 'bottom' are 'auto' and 'top' is not 'auto'." />
12 <style type="text/css">
13 #div1
14 {
15 position: relative;
16 }
17 div div
18 {
19 background: blue;
20 bottom: auto;
21 color: orange;
22 font: 100px/1 Ahem;
23 height: auto;
24 margin-bottom: auto;
25 margin-top: auto;
26 position: absolute;
27 top: 25px;
28 width: 200px;
29 }
30
31 <!--
32 "
33 height' and 'bottom' are 'auto' and 'top' is not 'auto',
34 then the height is based on the content per 10.6.7,
35 set 'auto' values for 'margin-top' and 'margin-bottom' to 0,
36 and solve for 'bottom'
37 "
38 http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height
39
40 In this test,
41 top used value will be 25px
42 height used value will be 100px
43 vertical margins will be 0px
44 bottom used value will be -125px
45 because the computed height of containing block is 0px.
46 -->
47
48 </style>
49 </head>
50 <body>
51 <p>Test passes if the orange and blue squares have the <strong>same heig ht</strong>.</p>
52 <div id="div1">
53 <div>X</div>
54 </div>
55 </body>
56 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698