From ea5a0c5ae0193b655521df5dac4be740b3a9084d Mon Sep 17 00:00:00 2001 From: Johann150 Date: Sat, 8 Jun 2024 17:08:07 +0200 Subject: [PATCH 1/2] fix margin collapse of adjacent sections --- simple.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/simple.css b/simple.css index f1f0f92..bff5fe3 100644 --- a/simple.css +++ b/simple.css @@ -359,6 +359,10 @@ section:first-child { padding-top: 0; } +section + section { + margin-top: 0; +} + section:last-child { border-bottom: 0; padding-bottom: 0; From f24a0109a499d4f22c3a858bddbd0e92982483dd Mon Sep 17 00:00:00 2001 From: Johann150 Date: Sat, 8 Jun 2024 17:11:37 +0200 Subject: [PATCH 2/2] fix margin collapse for h3 Both h2 and h3 have a margin-top set, but this rule for removing/collapsing the margin was only defined for h2. I'm assuming this was just forgotten. --- simple.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/simple.css b/simple.css index bff5fe3..d8dc097 100644 --- a/simple.css +++ b/simple.css @@ -341,7 +341,9 @@ article, fieldset, dialog { } article h2:first-child, -section h2:first-child { +section h2:first-child, +article h3:first-child, +section h3:first-child { margin-top: 1rem; }