tor-browser

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

vars-border-shorthand-serialize.html (1371B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4    <title>CSS Variables Test: Set border shorthand and serialize border-*</title>
      5  <link rel="author" title="Kevin Babbitt" href="kbabbitt@microsoft.com">
      6  <link rel="help" href="http://www.w3.org/TR/css-variables-1/#variables-in-shorthands">
      7  <meta name="assert" content="Pending-substitution values must be serialized as the empty string, if an API allows them to be observed.">
      8  <script src="/resources/testharness.js"></script>
      9  <script src="/resources/testharnessreport.js"></script>
     10 </head>
     11 <body>
     12    <div id="test" style="border: var(--border)"></div>
     13 
     14    <script type="text/javascript">
     15        "use strict";
     16 
     17        test(function() {
     18            assert_equals(document.getElementById("test").style.getPropertyValue("border-color"), "");
     19        }, "border-color should serialize to the empty string when border references a variable");
     20        test(function() {
     21            assert_equals(document.getElementById("test").style.getPropertyValue("border-style"), "");
     22        }, "border-style should serialize to the empty string when border references a variable");
     23        test(function() {
     24            assert_equals(document.getElementById("test").style.getPropertyValue("border-width"), "");
     25        }, "border-width should serialize to the empty string when border references a variable");
     26    </script>
     27 </body>
     28 </html>