Skip to content

Instantly share code, notes, and snippets.

@LucasLarson
Forked from mrmartineau/icons.scss
Last active November 10, 2018 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LucasLarson/bc1ee2cb0ec92ab3df26df611388fc9a to your computer and use it in GitHub Desktop.
Save LucasLarson/bc1ee2cb0ec92ab3df26df611388fc9a 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
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="icons.svg#logo-twitter"/>
</svg>
</a>
<a class="socialCTA">
<svg title="Facebook" class="icon icon--facebook">
<use xlink:href="icons.svg#logo-facebook"/>
</svg>
</a>
<a class="socialCTA">
<svg title="Instagram" class="icon icon--instagram">
<use xlink:href="icons.svg#logo-instagram"/>
</svg>
</a>
<a class="socialCTA">
<svg title="Youtube" class="icon icon--youtube">
<use xlink:href="icons.svg#logo-youtube"/>
</svg>
</a>
<a class="socialCTA">
<svg title="Pinterest" class="icon icon--pinterest">
<use xlink:href="icons.svg#logo-pinterest"/>
</svg>
</a>
<a class="socialCTA">
<svg title="Whatsapp" class="icon icon--whatsapp">
<use xlink:href="icons.svg#logo-whatsapp"/>
</svg>
</a>
<a class="socialCTA">
<svg title="Email" class="icon icon--email">
<use xlink:href="icons.svg#email"/>
</svg>
</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment