Skip to content

Instantly share code, notes, and snippets.

@mrmartineau
Created September 18, 2016 09:46
Show Gist options
  • Save mrmartineau/314b01b300fa20a5a820a4d6889ffd42 to your computer and use it in GitHub Desktop.
Save mrmartineau/314b01b300fa20a5a820a4d6889ffd42 to your computer and use it in GitHub Desktop.
SVG social icons
// 3rd party brand colors - find more at brandcolors.net
$color-twitter : #55acee;
$color-facebook : #3b5998;
$color-youtube : #cd201f;
$color-pinterest : #bd081c;
$color-instagram : #e4405f;
$color-whatsapp : #25D366;
.socialCTA {
background-color: rgba(#fff, .2);
padding: 20px;
border-radius: 50%;
width: 50px;
height: 50px;
display: inline-block;
.icon {
max-width: 100%;
vertical-align: top;
width: 50px;
height: 50px;
}
&:hover {
background-color: rgba(#fff, .7);
.icon {
color: $orange;
}
}
}
.icon--twitter {
color: $color-twitter;
}
.icon--facebook {
color: $color-facebook;
}
.icon--instagram {
color: $color-instagram;
}
.icon--pinterest {
color: $color-pinterest;
}
.icon--youtube {
color: $color-youtube;
}
.icon--email {
color: $blue;
}
.icon--kickoff {
color: #fff;
}
.icon--whatsapp {
color: $color-whatsapp;
}
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<a class="socialCTA">
<svg title="Twitter" class="icon icon--twitter">
<use xlink:href="assets/dist/img/icons.svg#logo-twitter"/>
</svg>
</a>
<a class="socialCTA">
<svg title="Facebook" class="icon icon--facebook">
<use xlink:href="assets/dist/img/icons.svg#logo-facebook"/>
</svg>
</a>
<a class="socialCTA">
<svg title="Instagram" class="icon icon--instagram">
<use xlink:href="assets/dist/img/icons.svg#logo-instagram"/>
</svg>
</a>
<a class="socialCTA">
<svg title="Youtube" class="icon icon--youtube">
<use xlink:href="assets/dist/img/icons.svg#logo-youtube"/>
</svg>
</a>
<a class="socialCTA">
<svg title="Pinterest" class="icon icon--pinterest">
<use xlink:href="assets/dist/img/icons.svg#logo-pinterest"/>
</svg>
</a>
<a class="socialCTA">
<svg title="Whatsapp" class="icon icon--whatsapp">
<use xlink:href="assets/dist/img/icons.svg#logo-whatsapp"/>
</svg>
</a>
<a class="socialCTA">
<svg title="Email" class="icon icon--email">
<use xlink:href="assets/dist/img/icons.svg#email"/>
</svg>
</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment