Instantly share code, notes, and snippets.
Last active
June 1, 2017 13:32
-
Star
1
(1)
You must be signed in to star a gist -
Fork
0
(0)
You must be signed in to fork a gist
-
Save ScarletPonytail/2d7d9b4d53ab43adde322a60fd7c3338 to your computer and use it in GitHub Desktop.
CSS - Spinny Social Icons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add Font Awesome for social icons | |
function font_awesome() { | |
echo '<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" />'; | |
} | |
add_action('wp_head', 'font_awesome'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Social Icons Styling */ | |
/* --------------------------------------- */ | |
ul.social-network { | |
list-style: none; | |
display: inline; | |
margin-left: 0 !important; | |
padding: 0; | |
} | |
ul.social-network li { | |
display: inline; | |
margin: 0 2px; | |
} | |
.social-network a.icoRss:hover { | |
background-color: #1C1B19; /* Background hover colour */ | |
} | |
.social-network a.icoRss:hover i, .social-network .social-circle li a.icoRss:hover .triggeredHover, .social-circle li .social-network a.icoRss:hover .triggeredHover { | |
color: #fff; /* Icon hover colour */ | |
} | |
.social-network a.icoFacebook:hover { | |
background-color: #1C1B19; /* Background hover colour */ | |
} | |
.social-network a.icoFacebook:hover i, .social-network .social-circle li a.icoFacebook:hover .triggeredHover, .social-circle li .social-network a.icoFacebook:hover .triggeredHover { | |
color: #fff; /* Icon hover colour */ | |
} | |
.social-network a.icoTwitter:hover { | |
background-color: #1C1B19; /* Background hover colour */ | |
} | |
.social-network a.icoTwitter:hover i, .social-network .social-circle li a.icoTwitter:hover .triggeredHover, .social-circle li .social-network a.icoTwitter:hover .triggeredHover { | |
color: #fff; /* Icon hover colour */ | |
} | |
.social-network a.icoGoogle:hover { | |
background-color: #1C1B19; /* Background hover colour */ | |
} | |
.social-network a.icoGoogle:hover i, .social-network .social-circle li a.icoGoogle:hover .triggeredHover, .social-circle li .social-network a.icoGoogle:hover .triggeredHover { | |
color: #fff; /* Icon hover colour */ | |
} | |
.social-network a.icoVimeo:hover { | |
background-color: #1C1B19; /* Background hover colour */ | |
} | |
.social-network a.icoVimeo:hover i, .social-network .social-circle li a.icoVimeo:hover .triggeredHover, .social-circle li .social-network a.icoVimeo:hover .triggeredHover { | |
color: #fff; /* Icon hover colour */ | |
} | |
.social-network a.icoLinkedin:hover { | |
background-color: #1C1B19; /* Background hover colour */ | |
} | |
.social-network a.icoLinkedin:hover i, .social-network .social-circle li a.icoLinkedin:hover .triggeredHover, .social-circle li .social-network a.icoLinkedin:hover .triggeredHover { | |
color: #fff; /* Icon hover colour */ | |
} | |
a.socialIcon .socialHoverClass, a.socialIcon a.socialIcon:hover { | |
color: #44BCDD; /* Icon hover colour */ | |
} | |
.social-circle a { | |
background-color: #D0BF86; /* Main background colour */ | |
} | |
.social-circle i, .social-circle li a:hover .triggeredHover { | |
color: #1C1B19; /* Main icon colour */ | |
-webkit-transition: all 0.8s; | |
-moz-transition: all 0.8s; | |
-o-transition: all 0.8s; | |
-ms-transition: all 0.8s; | |
transition: all 0.8s; | |
} | |
.social-circle li a { | |
display: inline-block; | |
position: relative; | |
margin: 0 auto 0 auto; | |
-moz-border-radius: 50%; | |
-webkit-border-radius: 50%; | |
border-radius: 50%; | |
text-align: center; | |
width: 40px; | |
height: 40px; | |
font-size: 18px; | |
} | |
.social-circle li a:hover i, .social-circle li a:hover .triggeredHover { | |
-moz-transform: rotate(360deg); | |
-webkit-transform: rotate(360deg); | |
-ms--transform: rotate(360deg); | |
transform: rotate(360deg); | |
-webkit-transition: all 0.2s; | |
-moz-transition: all 0.2s; | |
-o-transition: all 0.2s; | |
-ms-transition: all 0.2s; | |
transition: all 0.2s; | |
} | |
.social-circle li i, .social-circle li a:hover .triggeredHover { | |
margin: 0; | |
line-height: 43px; | |
text-align: center; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Social Icons --> | |
<ul class="social-network social-circle"> | |
<li><a href="http://stage11.brightdesign.co.uk/feed/" class="icoRss" title="Rss" target="_blank"><i class="fa fa-rss"></i></a></li> | |
<li><a href="http://www.facebook.com" class="icoFacebook" title="Facebook" target="_blank"><i class="fa fa-facebook"></i></a></li> | |
<li><a href="http://www.twitter.com" class="icoTwitter" title="Twitter" target="_blank"><i class="fa fa-twitter"></i></a></li> | |
<li><a href="http://www.youtube.com" class="icoTwitter" title="Youtube" target="_blank"><i class="fa fa-youtube"></i></a></li> | |
<li><a href="http://plus.google.com" class="icoGoogle" title="Google Plus" target="_blank"><i class="fa fa-google-plus"></i></a></li> | |
<li><a href="http://www.linkedin.com" class="icoLinkedin" title="Linkedin" target="_blank"><i class="fa fa-linkedin"></i></a></li> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Social Icons | |
// ---------------------------------- | |
ul.social-network { | |
list-style: none; | |
display: inline-block; | |
margin-left: 0 !important; | |
padding: 0; | |
li { | |
display: inline-block; | |
} | |
} | |
.social-network { | |
a.icoRss { | |
&:hover { | |
i { | |
color: $white; // Icon colour hovered state | |
} | |
} | |
} | |
a.icoFacebook { | |
&:hover { | |
i { | |
color: $white; // Icon colour hovered state | |
} | |
} | |
} | |
a.icoTwitter { | |
&:hover { | |
i { | |
color: $white; // Icon colour hovered state | |
} | |
} | |
} | |
a.icoGoogle { | |
&:hover { | |
i { | |
color: $white; // Icon colour hovered state | |
} | |
} | |
} | |
a.icoVimeo { | |
&:hover { | |
i { | |
color: $white; // Icon colour hovered state | |
} | |
} | |
} | |
a.icoLinkedin { | |
&:hover { | |
i { | |
color: $white; // Icon colour hovered state | |
} | |
} | |
} | |
} | |
.social-circle { | |
a { | |
background-color: $primary-colour; // Icon background unhovered state | |
&:hover { | |
background-color: $primary-colour-1; // Icon background hovered state | |
} | |
} | |
i { | |
color: $white; // Icon colour unhovered state | |
-webkit-transition: all 0.8s; | |
-moz-transition: all 0.8s; | |
-o-transition: all 0.8s; | |
-ms-transition: all 0.8s; | |
transition: all 0.8s; | |
} | |
li { | |
a { | |
display: inline-block; | |
position: relative; | |
margin: 0 auto 0 auto; | |
-moz-border-radius: 50%; | |
-webkit-border-radius: 50%; | |
border-radius: 50%; | |
text-align: center; | |
width: 40px; | |
height: 40px; | |
font-size: 18px; | |
&:hover { | |
i { | |
-moz-transform: rotate(360deg); | |
-webkit-transform: rotate(360deg); | |
-ms--transform: rotate(360deg); | |
transform: rotate(360deg); | |
-webkit-transition: all 0.2s; | |
-moz-transition: all 0.2s; | |
-o-transition: all 0.2s; | |
-ms-transition: all 0.2s; | |
transition: all 0.2s; | |
} | |
.triggeredHover { | |
@extend i; | |
} | |
} | |
} | |
i { | |
margin: 0; | |
line-height: 43px; | |
text-align: center; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment