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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/css/CSS2/normal-flow/block-non-replaced-width-008.xht

Issue 2818243002: Import css21/normal-flow 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
3 <html xmlns="http://www.w3.org/1999/xhtml">
4
5 <head>
6
7 <title>CSS Test: Solving 'width: auto' of a block-level non-replaced element i n normal flow with one other property set to an 'auto' value</title>
8
9 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserB ugsSection/css21testsuite/" />
10 <link rel="help" title="10.3.3 Block-level, non-replaced elements in normal fl ow" href="http://www.w3.org/TR/CSS21/visudet.html#blockwidth" />
11 <meta content="" name="flags" />
12 <meta content="If 'width' is set to 'auto', any other 'auto' values become '0' and the determination of 'width' proceeds from the following equality: 'margin- left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'bord er-right-width' + 'margin-right' = width of containing block" name="assert" />
13
14 <style type="text/css"><![CDATA[
15 div {height: 200px;}
16
17 div#containing-block
18 {
19 border-right: red solid 200px;
20 padding-right: 200px;
21 width: 0px;
22 }
23
24 div#child
25 {
26 border-right: green solid 200px;
27 margin-right: -400px;
28 }
29
30 /*
31 Calculation of used width for div#child:
32
33 margin-left : 0px (or auto)
34 + border-left-width : 0px
35 + padding-left : 0px
36 + width : auto
37 + padding-right : 0px
38 + border-right-width : 200px
39 + margin-right : -400px
40 ====================================
41 width of containing block : 0px
42
43 Therefore 'width: auto' must be resolved as 'width: 200px'.
44 Therefore div#child's green border-right should overlap perfectly
45 div#containing-block's red border-right.
46 */
47 ]]></style>
48
49 </head>
50
51 <body>
52
53 <p>Test passes if there is a filled green square and <strong>no red</strong>.< /p>
54
55 <div id="containing-block">
56 <div id="child"></div>
57 </div>
58
59 </body>
60 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698