Style Jetpacks Social Sharing Buttons

StudioPress themes have already published a tutorial for members which includes CSS code that enables you to style your sharing buttons if using Jetpack or Slim Jetpack.

In this post, i’ll provide the CSS code which enables you to style the background & hover colors so they’re the same as each social provider uses.

Default Button Style

default style

Custom Button Style

custom style

All CSS code should be pasted near the end of your child themes style.css file before the start of the Media Queries if included in that file.

.content div.sharedaddy div.sd-block {
	border: none;
	margin-bottom: 10px;
	margin-bottom: 1rem;
	padding: 0;
}

.single-format-quote .content div.sharedaddy div.sd-block {
	display: none;
}

.content div.sharedaddy .sd-content {
	float: left;
	margin-bottom: 10px;
	margin-bottom: 1rem;
}

.content div.sharedaddy a.sd-button {
	border: none !important;
	box-shadow: none;
}

.content .sd-social-icon-text a.sd-button > span, a.sd-button > span {
	opacity: 1;
	padding: 8px 15px;
	padding: 0.8rem 1.5rem;
}

.content li.share-facebook a.sd-button > span,
.content li.share-google-plus-1 a.sd-button > span,
.content li.share-linkedin a.sd-button > span,
.content li.share-pinterest a.sd-button > span,
.content li.share-twitter a.sd-button > span {
	border: none;
	color: #fff;
	font-family: 'verdana', arial;
	font-size: 14px;
	font-size: 1.4rem;
	font-weight: 300;
	letter-spacing: 2px;
	letter-spacing: 0.2rem;
	text-transform: uppercase;
}

.content li.share-facebook a.sd-button > span {
background: #4965a0;
}
.content li.share-google-plus-1 a.sd-button > span {
background: #dd4b39;
}
.content li.share-linkedin a.sd-button > span {
background: #1b86bc;
}
.content li.share-twitter a.sd-button > span {
background: #00abf0;
}

.content li.share-facebook a.sd-button:hover > span,
.content li.share-google-plus-1 a.sd-button:hover > span,
.content li.share-linkedin a.sd-button:hover > span,
.content li.share-twitter a.sd-button:hover > span {
	background: #000;
}

.sd-content .sd-button span.share-count {
	color: #fff !important;
	font-size: 100% !important;
}

div.sharedaddy h3 {
font-size:clamp(14px, 0.875rem + ((1vw - 3.2px) * 0.625), 20px);!important;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
text-transform: none;
letter-spacing: 0;
line-height: 1;
font-weight: bold;
}

Style More Providers

To style other social providers, simply add this code to the existing block above and change the background color to match your new providers colors:

.content li.share-add-provider-name-here a.sd-button > span {
background: #000000;
}

You also need to replace add-provider-name-here with the name of the provider. You can choose from a list of providers included in Jetpacks sharedaddy module once you install the Jetpack plugin.

Sharing Settings

Use in Other Themes

This code only works in themes using .content as the content class.

You can also use this code in other themes simply by changing all instances of .content to whatever class your themes uses for the content.

Twenty Eleven – Change from .content to #content
Twenty Twelve – Change from .content to .entry-content

Notepad++ enables you to search find and replace classes with new classes.

Note: You can reduce the size of the buttons simply by reducing the size of the font.

More On Customizing Jetpacks Social Buttons


Comments

14 responses to “Style Jetpacks Social Sharing Buttons”

  1. I’ve just added this code and whilst it did work, it doesn’t include the social share icons i.e. the ‘twitter bird’ and facebook ‘f’ it just converts the jetpack styles into rectangles with the words TWITTER, FACEBOOK etc

    Is there anyway to use this code but include the social media icons. So instead of saying FACEBOOK TWITTER etc it just has the graphic icon and then says either like share etc and then shows the number of shares?

    So what we end up with are nice flat rectangles of each of the social networks colours with their respective icons inside them with their words share or like (depending upon network)

    1. Brad Dalton Avatar
      Brad Dalton

      Yes you could use icons and code that into your solution.

  2. Hey Brad, great css and easy to use. Are you able to update the css to reflect your website, with the more button squares on click.

    Thanks, Murray

    1. Brad Dalton Avatar
      Brad Dalton

      Hello Murray

      You mean you want to make the read more link a button? Not sure i understand your question. Please clarify.

  3. Can you style these as you have them as flat rectangles of colour but also include the social icons and sharing counter?

    1. Brad Dalton Avatar
      Brad Dalton

      Thats exactly how this code styles them.

      It only changes the background color so the icons and counter are unaffected and still display.

  4. Hi there! I would like these buttons to be centered with no text (aka “Share This:). I check float: left; to float: middle; and it did push it over but it isn’t centered. It appears there is padding in there somewhere but I can’t find it. Any ideas?

  5. That really styled the dull common share buttons.
    It’s working flawlessly on my site with slight modification 🙂

    Thanks for sharing it..

  6. Thanks, I found the page..
    Great job Brad.
    -Scot

  7. The default options is Logo + Text, how if i want to show text only with this style?
    The css class without logo is : class=”share-facebook sd-button no-icon”

    So, what must i do to style “Text Only Options”?

    1. Brad Dalton Avatar
      Brad Dalton

      I would inspect the text using Firebug to find the right classes to use in your rules.

  8. Hi Brad, I’m very enjoy to explore around your blog. Very useful and nice of tutorials. But I wonder if you can put some search box? All of your tutorials is superb but it’s hard to find specific topic when I need them.. 🙂

    1. Brad Dalton Avatar
      Brad Dalton

      Hello Naim

      Yes i want to do that but i also want people to make a donation to use it so i need to work out the best way to go about it.

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.