tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

background-position-valid.html (3126B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>CSS Backgrounds and Borders Module Level 3: parsing background-position with valid values</title>
      6 <link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
      7 <link rel="help" href="https://drafts.csswg.org/css-backgrounds/#background-position">
      8 <meta name="assert" content="background-position supports the full grammar '<bg-position>'.">
      9 <script src="/resources/testharness.js"></script>
     10 <script src="/resources/testharnessreport.js"></script>
     11 <script src="/css/support/parsing-testcommon.js"></script>
     12 </head>
     13 <body>
     14 <script>
     15 test_valid_value("background-position", "1px", ["1px", "1px center"]);
     16 test_valid_value("background-position", "1px center", ["1px", "1px center"]);
     17 test_valid_value("background-position", "-2% -3%");
     18 test_valid_value("background-position", "5% top");
     19 test_valid_value("background-position", "center", ["center", "center center"]);
     20 test_valid_value("background-position", "center center", ["center", "center center"]);
     21 test_valid_value("background-position", "center 6px");
     22 test_valid_value("background-position", "center left", ["left center", "left"]);
     23 test_valid_value("background-position", "center right 7%", "right 7% center");
     24 test_valid_value("background-position", "center bottom", ["center bottom", "bottom"]);
     25 test_valid_value("background-position", "center top 8px", ["center top 8px", "center 8px"]);
     26 test_valid_value("background-position", "left", ["left center", "left"]);
     27 test_valid_value("background-position", "right 9%");
     28 test_valid_value("background-position", "left 10px center", ["left 10px center", "10px"]);
     29 test_valid_value("background-position", "right 11% bottom", ["right 11% bottom", "right 11% bottom 0%"]); // "right 11% bottom 0%" in Edge
     30 test_valid_value("background-position", "left 12px top 13px", ["left 12px top 13px", "12px 13px"]);
     31 test_valid_value("background-position", "right center", ["right center", "right"]);
     32 test_valid_value("background-position", "left bottom");
     33 test_valid_value("background-position", "right top 14%", ["right top 14%", "right 14%"]);
     34 test_valid_value("background-position", "bottom", ["center bottom", "bottom"]);
     35 test_valid_value("background-position", "top 15px center", ["center top 15px", "center 15px"]);
     36 test_valid_value("background-position", "bottom 16% left", ["left bottom 16%", "left 0% bottom 16%"]); // "left 0% bottom 16%" in Edge
     37 test_valid_value("background-position", "top 17px right 18px", "right 18px top 17px");
     38 test_valid_value("background-position", "bottom center", ["center bottom", "bottom"]);
     39 test_valid_value("background-position", "top left", "left top");
     40 test_valid_value("background-position", "bottom right 19%", ["right 19% bottom", "right 19% bottom 0%"]); // "right 19% bottom 0%" in Edge
     41 test_valid_value("background-position", "20% 0%");
     42 test_valid_value("background-position", "0% 0%");
     43 test_valid_value("background-position", "0%", ["0%", "0% center"]);
     44 test_valid_value("background-position", "0% center", ["0%", "0% center"]);
     45 test_valid_value("background-position", "center 0%");
     46 </script>
     47 </body>
     48 </html>