tor-browser

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

important-vs-inline-003.html (774B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4  <meta charset="utf-8">
      5  <title>CSS Cascade: inline style loses to !important</title>
      6  <link rel="help" href="https://crbug.com/1332956">
      7  <link rel="author" href="mailto:sesse@chromium.org">
      8  <script src="/resources/testharness.js"></script>
      9  <script src="/resources/testharnessreport.js"></script>
     10  <style>
     11    .cls {
     12      visibility: inherit !important;
     13    }
     14  </style>
     15 </head>
     16 <body>
     17  <div class="cls" id="el" style="visibility: hidden; height: 200px;"><iframe></iframe></div>
     18 </body>
     19 <script>
     20 test(() => {
     21  el.setAttribute('disabled', 'disabled');
     22  el.offsetTop;
     23  el.style.height = '400px';
     24  assert_equals(getComputedStyle(el).visibility, "visible", "!important has higher priority than inline style");
     25 });
     26 </script>
     27 </html>