ladybird/Tests/LibWeb/Text/input/css/CSSPropertyRule-invalid-rules.html
Alex Ungurianu a4c72f50c0 LibWeb: Parse @property CSS directives
This is not a complete parse, as it doesn't validate or take into
account the parsed syntax.
Enough to get us a few more WPT tests though :)
2024-10-23 06:55:37 +01:00

44 lines
936 B
HTML

<!DOCTYPE html>
<style>
@property badname {
syntax: "*";
inherits: false;
initial-value: blue;
}
@property --extra-syntax-tokens {
syntax: "*" "bad";
inherits: false;
initial-value: blue;
}
@property --extra-inherits-tokens {
syntax: "*";
inherits: false "bad";
initial-value: blue;
}
@property --missing-syntax {
inherits: false;
initial-value: blue;
}
@property --missing-inherits {
syntax: "*";
initial-value: blue;
}
@property --valid {
syntax: "*";
inherits: false;
}
</style>
<div>This text shouldn't be visible</div>
<script src="../include.js"></script>
<script>
test(() => {
const cssRuleCount = document.styleSheets[0].cssRules.length;
println(`Number of parsed css rules: ${cssRuleCount} (expected: 1)`);
});
</script>