tor-browser

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

inheritance.sub.html (3749B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>Inheritance of CSS Backgrounds and Borders properties</title>
      6 <link rel="help" href="https://drafts.csswg.org/css-backgrounds-3/#property-index">
      7 <link rel="help" href="https://drafts.csswg.org/css-backgrounds-4/#property-index">
      8 <meta name="assert" content="Properties inherit or not according to the spec.">
      9 <meta name="assert" content="Properties have initial values according to the spec.">
     10 <script src="/resources/testharness.js"></script>
     11 <script src="/resources/testharnessreport.js"></script>
     12 <script src="/css/support/inheritance-testcommon.js"></script>
     13 </head>
     14 <body>
     15 <div id="reference"></div>
     16 <!-- container and target are used by the functions in inheritance-testcommon.js -->
     17 <div id="container">
     18  <div id="target"></div>
     19 </div>
     20 <style>
     21  #reference {
     22    column-rule-style: dotted; /* Avoid column-rule-width computed style 0px */
     23    column-rule-width: medium;
     24  }
     25  #container {
     26    border-style: solid; /* Avoid border-*-width computed style 0px */
     27  }
     28  #target {
     29    border-style: solid; /* Avoid border-*-width computed style 0px */
     30  }
     31 </style>
     32 <script>
     33 const transparentColor = 'rgba(0, 0, 0, 0)'; // https://www.w3.org/TR/css-color-3/#transparent
     34 const mediumWidth = '3px'; // https://www.w3.org/TR/css-backgrounds-3/#valdef-line-width-medium
     35 const currentColor = 'rgb(2, 3, 4)';
     36 container.style.color = currentColor;
     37 
     38 
     39 // assert_not_inherited accepts: property name, expected initial value, another value the property supports.
     40 assert_not_inherited('background-attachment', 'scroll', 'fixed');
     41 assert_not_inherited('background-clip', 'border-box', 'padding-box');
     42 assert_not_inherited('background-color', transparentColor, 'rgb(42, 53, 64)');
     43 assert_not_inherited('background-image', 'none', 'url("https://{{host}}/")');
     44 assert_not_inherited('background-origin', 'padding-box', 'content-box');
     45 assert_not_inherited('background-position', '0% 0%', '10px 20px');
     46 assert_not_inherited('background-position-x', '0%', '10px');
     47 assert_not_inherited('background-position-y', '0%', '20px');
     48 assert_not_inherited('background-repeat', 'repeat', 'space round');
     49 assert_not_inherited('background-size', 'auto', 'contain');
     50 
     51 assert_not_inherited('border-bottom-color', currentColor, 'rgb(42, 53, 64)');
     52 assert_not_inherited('border-bottom-left-radius', '0px', '5px 7%');
     53 assert_not_inherited('border-bottom-right-radius', '0px', '5px 7%');
     54 assert_not_inherited('border-bottom-style', 'none', 'dashed');
     55 assert_not_inherited('border-bottom-width', mediumWidth, '10px');
     56 
     57 assert_not_inherited('border-image-outset', '0', '1px 2px 3px 4px');
     58 assert_not_inherited('border-image-repeat', 'stretch', 'repeat round');
     59 assert_not_inherited('border-image-slice', '100%', '1% 2% 3% 4% fill');
     60 assert_not_inherited('border-image-source', 'none', 'url("https://{{host}}/")');
     61 assert_not_inherited('border-image-width', '1', '1px 2px 3px 4px');
     62 
     63 assert_not_inherited('border-left-color', currentColor, 'rgb(42, 53, 64)');
     64 assert_not_inherited('border-left-style', 'none', 'dashed');
     65 assert_not_inherited('border-left-width', mediumWidth, '10px');
     66 
     67 assert_not_inherited('border-right-color', currentColor, 'rgb(42, 53, 64)');
     68 assert_not_inherited('border-right-style', 'none', 'dashed');
     69 assert_not_inherited('border-right-width', mediumWidth, '10px');
     70 
     71 assert_not_inherited('border-top-color', currentColor, 'rgb(42, 53, 64)');
     72 assert_not_inherited('border-top-left-radius', '0px', '5px 7%');
     73 assert_not_inherited('border-top-right-radius', '0px', '5px 7%');
     74 assert_not_inherited('border-top-style', 'none', 'dashed');
     75 assert_not_inherited('border-top-width', mediumWidth, '10px');
     76 
     77 assert_not_inherited('box-shadow', 'none', 'rgb(42, 53, 64) 1px 2px 3px 4px');
     78 </script>
     79 </body>
     80 </html>