Created
August 6, 2014 20:59
-
-
Save mborsare/cfef679b4a9e81d6d348 to your computer and use it in GitHub Desktop.
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.14) | |
// Compass (v1.0.0.rc.1) | |
// ---- | |
// The Mixin | |
//////////////////////////////////////////////////////////////////////////// | |
@mixin comprehension-highlight($content-type, $element-type) { | |
$comprehensions: weak, fair, strong; | |
@if $element-type == "table" { | |
#{$content-type} { | |
@each $comprehension in $comprehensions { | |
&.#{$comprehension} { | |
#{$element-type} { | |
box-shadow: inset 0 0 0 10px $comprehension; | |
} | |
} | |
} | |
} | |
} | |
@else if $element-type == "figure" { | |
#{$content-type} { | |
@each $comprehension in $comprehensions { | |
&.#{$comprehension} { | |
#{$element-type} { | |
box-shadow: inset 0 0 0 10px $comprehension; | |
} | |
} | |
} | |
} | |
} | |
} | |
// In Use | |
//////////////////////////////////////////////////////////////////////////// | |
@include comprehension-highlight (text, figure); | |
@include comprehension-highlight (text, table); |
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
text.weak figure { | |
box-shadow: inset 0 0 0 10px weak; | |
} | |
text.fair figure { | |
box-shadow: inset 0 0 0 10px fair; | |
} | |
text.strong figure { | |
box-shadow: inset 0 0 0 10px strong; | |
} | |
text.weak table { | |
box-shadow: inset 0 0 0 10px weak; | |
} | |
text.fair table { | |
box-shadow: inset 0 0 0 10px fair; | |
} | |
text.strong table { | |
box-shadow: inset 0 0 0 10px strong; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment