Created
February 11, 2014 05:28
-
-
Save KatieK2/8929715 to your computer and use it in GitHub Desktop.
Demonstrates passing a variable into a mixin. Generated by SassMeister.com.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.0.rc.3) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
@mixin quotenote($bgimage: none) { | |
width: 80%; | |
background-color: #333; | |
padding: 1%; | |
margin-bottom: 1.5em; | |
@if $bgimage != none { | |
background: image-url("#{$bgimage}") #333 no-repeat 5px 8px; | |
} | |
} | |
blockquote { @include quotenote; } | |
.caution { @include quotenote($bgimage: "caution.png"); } | |
.note { @include quotenote($bgimage: "note.png"); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blockquote { | |
width: 80%; | |
background-color: #333; | |
padding: 1%; | |
margin-bottom: 1.5em; | |
} | |
.caution { | |
width: 80%; | |
background-color: #333; | |
padding: 1%; | |
margin-bottom: 1.5em; | |
background: url('/images/caution.png') #333333 no-repeat 5px 8px; | |
} | |
.note { | |
width: 80%; | |
background-color: #333; | |
padding: 1%; | |
margin-bottom: 1.5em; | |
background: url('/images/note.png') #333333 no-repeat 5px 8px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment