layout/reftests/w3c-css/submitted/ui3/box-sizing-content-box-002.xht

Wed, 31 Dec 2014 07:16:47 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:16:47 +0100
branch
TOR_BUG_9701
changeset 3
141e0f1194b1
permissions
-rw-r--r--

Revert simplistic fix pending revisit of Mozilla integration attempt.

     1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
     2 <html xmlns="http://www.w3.org/1999/xhtml">
     3  <head>
     4   <title>CSS Test: Box Sizing - Content-Box with specified width/height</title>
     5   <link rel="author" title="Scott Johnson" href="mailto:sjohnson@mozilla.com" />
     6   <link rel="help" href="http://www.w3.org/TR/css3-ui/#box-sizing" />
     7   <meta name="assert" content="box-sizing: content-box should make the element's (calc) width be the distance from the left content edge to the right content edge and the height be the distance from the top content edge to the bottom content edge."/>
     8   <style type="text/css"><![CDATA[
     9     .container {
    10       width: 300px;
    11       height: 100px;
    12       border: 2px solid black;
    13       position: absolute;
    14       left: 25px;
    15       top: 25px;
    16       background-color: red;
    17     }
    19     .box-sized {
    20       box-sizing: content-box;
    21       width: calc(50% - 10px);
    22       height: calc(100% - 10px);
    23       z-index: 1;
    24       float: left;
    25       padding: 5px 5px;
    26     }
    28     #one {
    29       background-color: green;
    30     }
    32     #two {
    33       background-color: blue;
    34     }
    35   ]]></style>
    36  </head>
    37  <body>
    38    The two divs should be side-by-side, not one on top of another. No red should be visible.
    39    <br />
    40    <div class="container">
    41      <div class="box-sized" id="one">LEFT HALF</div>
    42      <div class="box-sized" id="two">RIGHT HALF</div>
    43    </div>
    44  </body>
    45 </html>

mercurial