Skip to content

Instantly share code, notes, and snippets.

@mjsxi
Created August 25, 2015 19:22
Show Gist options
  • Select an option

  • Save mjsxi/35f5b5e951bba925934f to your computer and use it in GitHub Desktop.

Select an option

Save mjsxi/35f5b5e951bba925934f to your computer and use it in GitHub Desktop.

Revisions

  1. mjsxi created this gist Aug 25, 2015.
    33 changes: 33 additions & 0 deletions SassMeister-input.scss
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,33 @@
    // ----
    // 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);
    6 changes: 6 additions & 0 deletions SassMeister-output.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    /* first test */
    display: none;
    /* second test */
    background: transparent url(img) no-repeat 50% 50%;
    background-size: cover;
    padding-bottom: 94.85%;