summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-syntax/trailing-braces.html
blob: ac2e8e61b9942d96493269b18f7dc2d0860ff3aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE html>
<title>CSS Syntax: trailing braces</title>
<link rel="help" href="https://drafts.csswg.org/css-syntax-1/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style id=style>
  #target1 {
    color:green;
    color:red{};
    color:red {};
  }
</style>
<div id=target1>Green</div>
<script>
  test(() => {
    let rules = style.sheet.rules;
    assert_equals(rules.length, 1);
    assert_equals(rules[0].style.color, 'green');
  }, 'Trailing braces are not valid');
</script>