Skip to content

Commit

Permalink
Widgets: Try to fix color inheritance for social links. (#32625)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmussen authored and youknowriad committed Jun 14, 2021
1 parent dbc0abc commit 41da9b9
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions packages/block-library/src/social-links/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down

0 comments on commit 41da9b9

Please sign in to comment.