From 430b0108f081307b4e95edbe96ae6198d6930e67 Mon Sep 17 00:00:00 2001
From: jasmussen <joen@automattic.com>
Date: Mon, 22 Mar 2021 11:24:50 +0100
Subject: [PATCH] Temporarily hide extra Ps.

---
 .../block-library/src/navigation/style.scss     | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/packages/block-library/src/navigation/style.scss b/packages/block-library/src/navigation/style.scss
index 431c2b4789e62c..4b41c5fdb31dac 100644
--- a/packages/block-library/src/navigation/style.scss
+++ b/packages/block-library/src/navigation/style.scss
@@ -29,8 +29,9 @@
 			display: block;
 		}
 	}
-
 }
+
+// Menu feature for mobile.
 .wp-block-navigation__responsive-container {
 	display: none;
 	position: fixed;
@@ -39,6 +40,7 @@
 	right: 0;
 	bottom: 0;
 	background-color: #fff;
+
 	/*
 		arbitrary, high z-index
 		@todo: find correct value in order to make sure
@@ -47,6 +49,7 @@
 	z-index: 10;
 	align-items: center;
 	justify-content: center;
+
 	&.is-open {
 		display: flex;
 		flex-direction: column;
@@ -61,19 +64,30 @@
 		flex-direction: row;
 		position: relative;
 		background-color: inherit;
+
 		&.is-open {
 			flex-direction: row;
+
 			.wp-block-navigation__container {
 				flex-direction: row;
 			}
 		}
 	}
+
+	// Hide empty paragraph tags caused by wpautop. @todo, need to not output them in the first place.
+	[data-micromodal-close] > p,
+	[role="dialog"] > p,
+	> p {
+		display: none;
+	}
 }
+
 .wp-block-navigation__responsive-container-open {
 	@include break-mobile {
 		display: none;
 	}
 }
+
 .wp-block-navigation__responsive-container-close {
 	position: absolute;
 	top: 60px;
@@ -85,6 +99,7 @@
 		display: none;
 	}
 }
+
 // Justification.
 .items-justified-center > ul {
 	justify-content: center;