Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-syntax/trailing-braces.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Syntax: trailing braces</title>
<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>