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;
}
 

Brogan

XenForo moderator
Staff member
You can actually target a widget three ways - the id, key, or definition.

1602179977779.png

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