mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
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 :)
This commit is contained in:
parent
50d64b0fb7
commit
a4c72f50c0
Notes:
github-actions[bot]
2024-10-23 05:56:40 +00:00
Author: https://github.com/a-ungurianu
Commit: a4c72f50c0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1777
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/AtkinsSJ ✅
6 changed files with 178 additions and 0 deletions
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
@property --tester {
|
||||
syntax: "*";
|
||||
inherits: false;
|
||||
initial-value: blue;
|
||||
}
|
||||
</style>
|
||||
<div>This text shouldn't be visible</div>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const propertyRule = document.styleSheets[0].cssRules[0];
|
||||
println(`@property rule syntax value: ${propertyRule.syntax}`);
|
||||
propertyRule.syntax = "<color> | none";
|
||||
println(`@property rule syntax value: ${propertyRule.syntax}`);
|
||||
|
||||
println(`@property rule inherits value: ${propertyRule.inherits}`);
|
||||
propertyRule.inherits = true;
|
||||
println(`@property rule inherits value: ${propertyRule.inherits}`);
|
||||
|
||||
println(`@property rule initialValue value: ${propertyRule.initialValue}`);
|
||||
propertyRule.initialValue = "red";
|
||||
println(`@property rule initialValue value: ${propertyRule.initialValue}`);
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue