From a68b766dae7581bf0f2f23200be14588f77587f6 Mon Sep 17 00:00:00 2001 From: Joen A <1204802+jasmussen@users.noreply.github.com> Date: Fri, 11 Jun 2021 17:48:55 +0200 Subject: [PATCH] Widgets: Try to fix color inheritance for social links. (#32625) --- .../block-library/src/social-links/style.scss | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/block-library/src/social-links/style.scss b/packages/block-library/src/social-links/style.scss index eb1d5bc57934c3..eee1000a913f24 100644 --- a/packages/block-library/src/social-links/style.scss +++ b/packages/block-library/src/social-links/style.scss @@ -69,7 +69,7 @@ } } -.wp-social-link { +.wp-block-social-link { display: block; border-radius: 9999px; // This makes it pill-shaped instead of oval, in cases where the image fed is not perfectly sized. transition: transform 0.1s ease; @@ -84,20 +84,22 @@ transition: transform 0.1s ease; } - a, - a:hover, - a:active, - a:visited, - svg { - color: currentColor; - fill: currentColor; - } - &:hover { transform: scale(1.1); } } +// This needs specificity because themes usually override it with things like .widget-area a. +.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor { + &, + &:hover, + &:active, + &:visited, + svg { + color: currentColor; + fill: currentColor; + } +} // Provide colors for a range of icons. .wp-block-social-links:not(.is-style-logos-only) {