From 21b1f1653d0e50b71d60f2b8bb9d1a7ea4e7b788 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 12 Jun 2020 17:41:14 +0200 Subject: [PATCH] LibWeb: Implement very basic margin collapsing We now collapse a block's top margin with the previous sibling's bottom margin so that the larger margin wins. --- Base/home/anon/www/margin-collapse-1.html | 16 ++++++++++++++++ Base/home/anon/www/welcome.html | 1 + Libraries/LibWeb/Layout/LayoutBlock.cpp | 9 ++++++++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 Base/home/anon/www/margin-collapse-1.html diff --git a/Base/home/anon/www/margin-collapse-1.html b/Base/home/anon/www/margin-collapse-1.html new file mode 100644 index 0000000000..a71abe391e --- /dev/null +++ b/Base/home/anon/www/margin-collapse-1.html @@ -0,0 +1,16 @@ + +
foo
+
bar
diff --git a/Base/home/anon/www/welcome.html b/Base/home/anon/www/welcome.html index 19306ae8cd..ed0c2e14b1 100644 --- a/Base/home/anon/www/welcome.html +++ b/Base/home/anon/www/welcome.html @@ -28,6 +28,7 @@ span#ua {

Your user agent is:

Some small test pages: