1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:17:35 +00:00

LibWeb: Add CSS logical property aliases for margin and padding sides

These just map to the LTR+TB defaults for now, as we don't yet resolve
any of the inputs to the logical property selection algorithm.
This commit is contained in:
Andreas Kling 2023-06-06 12:24:08 +02:00
parent 941092e3ad
commit abd6380cce
4 changed files with 131 additions and 0 deletions

View file

@ -0,0 +1,10 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (1,1) content-size 798x99.46875 [BFC] children: not-inline
BlockContainer <body> at (10,10) content-size 500x81.46875 children: not-inline
BlockContainer <div.a> at (51,21) content-size 413x49.46875 children: not-inline
BlockContainer <div.b> at (92,32) content-size 326x17.46875 children: inline
line 0 width: 41.78125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 5, rect: [93,32 39.78125x17.46875]
"Hello"
InlineNode <span>
TextNode <#text>

View file

@ -0,0 +1,29 @@
<!doctype html><style>
* {
border: 1px solid black;
}
body {
width: 500px;
}
.a {
padding-top: 100px;
padding-block-start: 10px;
padding-bottom: 50px;
padding-block-end: 20px;
padding-left: 80px;
padding-inline-start: 40px;
padding-right: 90px;
padding-inline-end: 45px;
}
.b {
margin-top: 100px;
margin-block-start: 10px;
margin-bottom: 50px;
margin-block-end: 20px;
margin-left: 80px;
margin-inline-start: 40px;
margin-right: 90px;
margin-inline-end: 45px;
}
</style><div class="a"><div class="b"><span>Hello</span>