From c278e55f446ff0050e1d7dcddf04087a8f4458e9 Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Mon, 28 Oct 2024 08:29:10 +0100 Subject: [PATCH] Adjust outline styles on the navigation block --- style.css | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/style.css b/style.css index 8691748e..2987eb14 100644 --- a/style.css +++ b/style.css @@ -29,6 +29,21 @@ a { outline-style: solid; } +/* Increase the bottom margin on submenus, so that the outline is visible. */ +.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) { + margin-bottom: 3px; +} + +/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */ +.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content { + outline-offset: 4px; +} + +/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */ +.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content { + outline-offset: 0; +} + /* * Progressive enhancement to reduce widows and orphans * https://github.com/WordPress/gutenberg/issues/55190