XF 2.2 How can I change share icon color but not in widget?

beerForo

Well-known member
Have a dark page bg so want to change share icons to white on the page only not in the widget (widget is white bg so want to keep as-is).

This changes both.

Code:
.shareButtons-button {
    color: white;
}
 
Solution
CSS:
.shareButtons-button
{
    color: orange;
}

[data-widget-definition="share_page"]
.shareButtons-button
{
    color: black;
}
You can actually target a widget three ways - the id, key, or definition.

1602179977779.webp

CSS:
[data-widget-id="10"]
.shareButtons-button
{
    color: black;
}

CSS:
[data-widget-key="forum_overview_share_page"]
.shareButtons-button
{
    color: black;
}

CSS:
[data-widget-definition="share_page"]
.shareButtons-button
{
    color: black;
}
 
Top Bottom