From 840c704f282b7048ec46fee7c5538715444df54a Mon Sep 17 00:00:00 2001 From: jasmussen Date: Thu, 29 Sep 2022 15:39:56 +0200 Subject: [PATCH 1/3] Navigation: Try fixing link color in some TT2 contexts. --- packages/block-library/src/navigation/style.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/block-library/src/navigation/style.scss b/packages/block-library/src/navigation/style.scss index 9114df2e6e210a..47efcff921f6ad 100644 --- a/packages/block-library/src/navigation/style.scss +++ b/packages/block-library/src/navigation/style.scss @@ -47,6 +47,10 @@ $navigation-icon-size: 24px; display: block; } + .wp-block-navigation-item__content.wp-block-navigation-item__content { + color: inherit; + } + // The following rules provide class based application of user selected text // decoration via block supports. &.has-text-decoration-underline .wp-block-navigation-item__content { From 4f2dbf90248f3e21e3dc159c08ef62a223d6632d Mon Sep 17 00:00:00 2001 From: jasmussen Date: Fri, 30 Sep 2022 10:27:58 +0200 Subject: [PATCH 2/3] Add comment. --- packages/block-library/src/navigation/style.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/block-library/src/navigation/style.scss b/packages/block-library/src/navigation/style.scss index 47efcff921f6ad..016412d770c428 100644 --- a/packages/block-library/src/navigation/style.scss +++ b/packages/block-library/src/navigation/style.scss @@ -47,6 +47,8 @@ $navigation-icon-size: 24px; display: block; } + // This rule needs extra specificity so that it inherits the correct color from its parent. + // Otherwise, a link color set by a parent group can override the value. .wp-block-navigation-item__content.wp-block-navigation-item__content { color: inherit; } From 73d58fb73ea442f772f78b6d834900a25b8ccd1e Mon Sep 17 00:00:00 2001 From: jasmussen Date: Mon, 3 Oct 2022 12:45:28 +0200 Subject: [PATCH 3/3] Update comment. --- packages/block-library/src/navigation/style.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/block-library/src/navigation/style.scss b/packages/block-library/src/navigation/style.scss index 016412d770c428..0a00d7a779d314 100644 --- a/packages/block-library/src/navigation/style.scss +++ b/packages/block-library/src/navigation/style.scss @@ -49,6 +49,8 @@ $navigation-icon-size: 24px; // This rule needs extra specificity so that it inherits the correct color from its parent. // Otherwise, a link color set by a parent group can override the value. + // This also fixes an issue where a navigation with an explicitly set color is overridden + // by link colors defined in Global Styles. .wp-block-navigation-item__content.wp-block-navigation-item__content { color: inherit; }