ladybird/Tests/LibWeb/Text/input/css/margin-rule-with-prelude-is-invalid.html
Sam Atkins 1a599ceb98 LibWeb/CSS: Reject @font-face and margin rules that have a prelude
I couldn't find any WPT coverage for this, so here's a homemade test.
2025-08-04 10:50:09 +01:00

15 lines
465 B
HTML

<!DOCTYPE html>
<style>
@page {
@top-left foo {}
}
</style>
<script src="../include.js"></script>
<script>
test(() => {
println(`\`@page {}\` should be valid: ${document.styleSheets[0].cssRules.length === 1 ? "PASS" : "FAIL"}`);
const page_rule = document.styleSheets[0].cssRules[0];
println(`\`@top-left foo {}\` in \`@page\` should be invalid: ${page_rule.cssRules.length === 0 ? "PASS" : "FAIL"}`);
});
</script>