tor-browser

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

keyframes-unrelated-custom-property.html (816B)


      1 <!DOCTYPE html>
      2 <title>Unrelated custom properties do not conflict with each other</title>
      3 <link rel="help" href="https://drafts.csswg.org/css-animations/">
      4 <link rel="help" href="https://crbug.com/1236043">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <style>
      8  @keyframes test {
      9    0% { --x: green; }
     10    100% { --x: green; }
     11 
     12    /* This should not affect the background-color of #div: */
     13    0% { --unused: yellow; }
     14  }
     15  #div {
     16    animation: test 10s linear paused;
     17    background-color: var(--x, red);
     18    width: 100px;
     19    height: 100px;
     20  }
     21 </style>
     22 <div id=div></div>
     23 <script>
     24 
     25 test(() => {
     26  assert_equals(getComputedStyle(div).backgroundColor, 'rgb(0, 128, 0)');
     27 }, 'Unrelated custom properties do not conflict with each other');
     28 
     29 </script>