Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-conditional/container-rule-malformed-prelude.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>@container with malformed prelude is silently dropped</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style id="malformed-prelude">
@container ) { .a { color: red } }
</style>
<script>
"use strict";
test(() => {
const { sheet } = document.getElementById("malformed-prelude");
assert_equals(sheet.cssRules.length, 0, "Malformed @container prelude should produce no rules");
}, "@container with invalid prelude is dropped without throwing");
</script>