wpt / css / css-values / attr-revert-rule.html

Status: FAIL | Duration: 58ms | Subtests: 0/1 | Open test on wpt.live | wpt.fyi

/css/css-values/attr-revert-rule.html

<!DOCTYPE html>
<title>The revert-rule keyword: interaction with attr()</title>
<link rel="help" href="https://drafts.csswg.org/css-cascade-5/#revert-rule-keyword">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<style>
  :root {
    #test1 {
      color: green;
    }
    #test1 {
      color: red;
      color: attr(data-unknown, revert-rule);
    }
  }
</style>
<div id=test1></div>
<script>
  test(() => {
    assert_true(CSS.supports('color:revert-rule'));
    assert_true(CSS.supports('color:attr(data-unknown, revert-rule)'));
    assert_equals(getComputedStyle(test1).color, 'rgb(0, 128, 0)')
  }, 'The revert-rule works in an attr() fallback');
</script>