Skip to content

Instantly share code, notes, and snippets.

@mjsxi
Last active August 25, 2015 19:21
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 mjsxi/29fe0539f67ba031e216 to your computer and use it in GitHub Desktop.
Save mjsxi/29fe0539f67ba031e216 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
/* first test */
$small: nothing; // fallback for images not uploaded
@mixin testSmall($s: null) {
@if ($s == nothing) {
display: none
} @else {
background: transparent url(img) no-repeat 50% 50%;
background-size: cover;
padding-bottom: 94.85%;
}
}
@include testSmall($small);
/* second test */
$small: any other value in the world; // link or value for uploaded image
@mixin testSmall($s: null) {
@if ($s == nothing) {
display: none
} @else {
background: transparent url(img) no-repeat 50% 50%;
background-size: cover;
padding-bottom: 94.85%;
}
}
@include testSmall($small);
/* first test */
display: none;
/* second test */
background: transparent url(img) no-repeat 50% 50%;
background-size: cover;
padding-bottom: 94.85%;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment