layout/reftests/css-parsing/supports-moz-bool-pref.html
author Ting-Yu Lin <tlin@mozilla.com>
Fri, 01 Apr 2016 21:11:11 +0800
changeset 291529 6559f99e1805147da0fb0c56e52a09397d36cc3b
permissions -rw-r--r--
Bug 1259889 Part 1 - Add @supports -moz-bool-pref for internal-only style sheets. r=heycam This is a internal-only syntax for guarding rules from a boolean preference. Nothing causes @supports rules to be re-evaluated except html.css registered in Part 2. This is needed for rendering the disclosure triangle of the summary element by using "display: list-item". Usage example: @supports -moz-bool-pref("dom.details_element.enabled") { /* css rules */ } MozReview-Commit-ID: HDCa8zHxYTA

<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
   - http://creativecommons.org/publicdomain/zero/1.0/ -->

<html>
  <style>
  /* This is not a user agent style sheet, so the style will be ignored.
     "testing.supports.moz-bool-pref" is set to true in
     layout/tools/reftest/reftest-preferences.js. */
  @supports -moz-bool-pref("testing.supports.moz-bool-pref") {
    p {
      background-color: red;
    }
  }
  </style>
  <body>
    <p>This text should not have background color.</p>
  </body>
</html>