tor-browser

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

registered-property-ident-function.html (910B)


      1 <!DOCTYPE html>
      2 <title>CSS Properties Values API: Registered custom properties with ident()</title>
      3 <link rel="help" href="https://drafts.csswg.org/css-values-5/#ident">
      4 <link rel="help" href="https://drafts.csswg.org/css-properties-values-api-1">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <style>
      8  @property --ident {
      9    syntax: "<custom-ident>";
     10    inherits: true;
     11    initial-value: none;
     12  }
     13 </style>
     14 <div id=target></div>
     15 <script>
     16  let actual_ident = 'ident("--myident" calc(42 * sign(1em - 1px)))';
     17  let expected_ident = '--myident42';
     18 
     19  test((t) => {
     20    t.add_cleanup(() => { target.style = ''; })
     21    target.style.setProperty('--ident', actual_ident);
     22    assert_equals(getComputedStyle(target).getPropertyValue('--ident'),
     23      expected_ident);
     24  }, 'The ident() function is resolved in a registered custom property');
     25 </script>