Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!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>