mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:37:44 +00:00
LibWeb: Fix bogus percentage vertical padding with box-sizing:border-box
The padding-top and padding-bottom properties are relative to the *width* of the containing block, not the height. It's funny how we keep making this same mistake again and again. :^)
This commit is contained in:
parent
07f6ee9e73
commit
24d5a9d7df
3 changed files with 42 additions and 2 deletions
|
@ -0,0 +1,20 @@
|
|||
<style>
|
||||
* {
|
||||
border: 1px solid black;
|
||||
}
|
||||
.cb {
|
||||
width: 600px;
|
||||
height: 10px;
|
||||
}
|
||||
.foo {
|
||||
background: orange;
|
||||
box-sizing: border-box;
|
||||
height: 200px;
|
||||
padding-top: 10%;
|
||||
padding-bottom: 20%;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div class="cb">
|
||||
<div class="foo">foo</div>
|
||||
bar
|
Loading…
Add table
Add a link
Reference in a new issue