<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>CSS Backgrounds and Borders Test: background-size '100% 100%' with background-clip 'content-box'</title>
    <link rel="author" title="Intel" href="http://www.intel.com">
    <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <!-- 2012-11-09 -->
    <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" title="3.9. Sizing Images: the 'background-size' property">
    <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-clip">
    <meta name="flags" content="image">
    <meta name="assert" content="Check if 'background-size' is '100% 100%' that it rescales the background image independently in both dimensions to completely cover the background positioning area (it is 150px by 150px in this test), and then the background image is clipped to fit into the content area (it is 100px by 100px as background-clip is 'content-box').">
    <style>
        #ref-overlapped-red {
            background-color: red;
            left: 30px;
            height: 100px;
            position: relative;
            top: 30px;
            width: 100px;
        }
        #test-overlapping-cat {
            background-clip: content-box;
            background-image: url(support/cat.png); /* 98px wide by 99px tall */
            background-repeat: no-repeat;
            background-size: 100% 100%;
            border: transparent dotted 5px;
            bottom: 100px;
            height: 100px;
            padding: 25px;
            position: relative;
            width: 100px;

            /*
            Background positioning area is 150px wide by 150px tall,
            and background painting area is 100px wide by 100px tall.
            So, the image should be scaled to 150px by 150px,
            and then be clipped to 100px by 100px.
            */
        }
    </style>
  </head>
  <body>
    <p>Test passes if there is a partially displayed cat and <strong>no red</strong>.</p>
    <div id="ref-overlapped-red"></div>
    <div id="test-overlapping-cat"></div>
  </body>
</html>
