mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibWeb: Let getComputedStyle() show *used* values for margin/padding
We were incorrectly showing *computed* instead of *used* values for margin and padding when inspected via getComputedStyle().
This commit is contained in:
parent
cdd2ccac0b
commit
a706d0ebf4
Notes:
github-actions[bot]
2025-02-22 19:03:09 +00:00
Author: https://github.com/awesomekling
Commit: a706d0ebf4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3654
5 changed files with 100 additions and 10 deletions
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#blockwidth">
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../../resources/check-layout-th.js"></script>
|
||||
<style>
|
||||
.container {
|
||||
display: flow-root;
|
||||
width: 100px;
|
||||
padding: 5px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.box {
|
||||
display: flow-root;
|
||||
width: 40px;
|
||||
height: 10px;
|
||||
background: lime;
|
||||
}
|
||||
</style>
|
||||
<body onload="checkLayout('.box')">
|
||||
<div class="container">
|
||||
<div class="box" style="margin: auto;" data-expected-margin-left="25" data-expected-margin-right="25"></div>
|
||||
<div class="box" style="margin-left: auto;" data-expected-margin-left="50" data-expected-margin-right="0"></div>
|
||||
<div class="box" style="margin-right: auto;" data-expected-margin-left="0" data-expected-margin-right="50"></div>
|
||||
</div>
|
||||
<div class="container" style="direction: rtl;">
|
||||
<div class="box" style="margin: auto;" data-expected-margin-left="25" data-expected-margin-right="25"></div>
|
||||
<div class="box" style="margin-left: auto;" data-expected-margin-left="50" data-expected-margin-right="0"></div>
|
||||
<div class="box" style="margin-right: auto;" data-expected-margin-left="0" data-expected-margin-right="50"></div>
|
||||
</div>
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue