Skip to content

Instantly share code, notes, and snippets.

@jeremycaldwell
Last active January 3, 2018 17:32
Show Gist options
  • Select an option

  • Save jeremycaldwell/6bce910f2fa606d34d6f6852682bddcf to your computer and use it in GitHub Desktop.

Select an option

Save jeremycaldwell/6bce910f2fa606d34d6f6852682bddcf to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
// Mixins.
@mixin icon {
background-position: 0 0;
background-repeat: no-repeat;
background-size: contain;
display: block;
height: 20px;
width: 20px;
}
@mixin icon-phone {
@include icon;
background-image: url(../images/icons/phone.svg);
}
// Apply icon to ":before" psuedo element.
.custom-title {
padding-left: 30px;
position: relative;
text-align: left;
// Icon.
&:before {
@include icon-phone;
content: '';
left: 0;
position: absolute;
}
}
// Apply icon to specific element.
.icon-phone {
@include icon-phone;
}
// Apply icon to specific element and increase size of icon.
.icon-phone__large {
@include icon-phone;
height: 50px;
width: 50px;
}
.custom-title {
padding-left: 30px;
position: relative;
text-align: left;
}
.custom-title:before {
background-position: 0 0;
background-repeat: no-repeat;
background-size: contain;
display: block;
height: 20px;
width: 20px;
background-image: url(../images/icons/phone.svg);
content: '';
left: 0;
position: absolute;
}
.icon-phone {
background-position: 0 0;
background-repeat: no-repeat;
background-size: contain;
display: block;
height: 20px;
width: 20px;
background-image: url(../images/icons/phone.svg);
}
.icon-phone__large {
background-position: 0 0;
background-repeat: no-repeat;
background-size: contain;
display: block;
height: 20px;
width: 20px;
background-image: url(../images/icons/phone.svg);
height: 50px;
width: 50px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment