mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:47:46 +00:00
LibWeb: Implement the math-depth
CSS property
This one is a bit fun because it can be `add(<integer>)` or `auto-add`, but children have to inherit the computed value not the specified one. We also have to compute it before computing the font-size, because of `font-size: math` which will be implemented later.
This commit is contained in:
parent
53f3ed026a
commit
6476dea898
19 changed files with 285 additions and 11 deletions
26
Tests/LibWeb/Text/input/css/math-depth.html
Normal file
26
Tests/LibWeb/Text/input/css/math-depth.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
println(getComputedStyle(document.getElementById("a")).mathDepth);
|
||||
println(getComputedStyle(document.getElementById("b")).mathDepth);
|
||||
println(getComputedStyle(document.getElementById("c")).mathDepth);
|
||||
println(getComputedStyle(document.getElementById("d")).mathDepth);
|
||||
println(getComputedStyle(document.getElementById("e")).mathDepth);
|
||||
println(getComputedStyle(document.getElementById("f")).mathDepth);
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
body { math-depth: 0; }
|
||||
ul > li { math-depth: add(1); }
|
||||
</style>
|
||||
<body>
|
||||
<ul id="a">
|
||||
<li id="b"></li>
|
||||
<li id="c">
|
||||
<ul id="d">
|
||||
<li id="e"></li>
|
||||
<li id="f"></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue