mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
This requires us to front load computation of writing-mode and direction
before we encounter any logical aliases or their physical counterparts
so that we can create a mapping context.
Doing this at compute rather than cascade time achieves a few things:
1) Brings us into line with the spec
2) Avoids the double cascade that was previously required to compute
mapping contexts
3) We now compute values of logical aliases, while
`style_value_for_computed_property` maps logical aliases to their
physical counterparts, this didn't account for all cases (i.e. if
there was no layout node, Typed OM, etc).
4) Removes a hurdle to moving other upstream processes (i.e. arbitrary
substitution function resolution, custom property computation) to
compute time as the spec requires.
15 lines
280 B
HTML
15 lines
280 B
HTML
<!doctype html>
|
|
<script src="../include.js"></script>
|
|
<style>
|
|
#target {
|
|
display: none;
|
|
padding-inline-start: 12px;
|
|
}
|
|
</style>
|
|
<div id="target"></div>
|
|
<script>
|
|
test(() => {
|
|
println(getComputedStyle(target).paddingInlineStart);
|
|
});
|
|
</script>
|