Skip to content

Instantly share code, notes, and snippets.

@Tyriar
Created February 9, 2014 02:24
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 Tyriar/8893261 to your computer and use it in GitHub Desktop.
Save Tyriar/8893261 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.3)
// Compass (v1.0.0.alpha.18)
// ----
@media screen {
%icon {
transition: background-color ease .2s;
margin: 0 .5em;
}
}
@mixin icon($color, $url) {
@extend %icon;
background-color: $color;
background-url: url($url);
}
.error-icon {
@include icon(red, '/images/error.png');
}
.info-icon {
@include icon(blue, '/images/info.png');
}
@media screen {
.error-icon, .info-icon {
transition: background-color ease .2s;
margin: 0 .5em;
}
}
.error-icon {
background-color: red;
background-url: url("/images/error.png");
}
.info-icon {
background-color: blue;
background-url: url("/images/info.png");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment