Skip to content

Instantly share code, notes, and snippets.

@ldamon
Created August 12, 2014 20:21
Show Gist options
  • Select an option

  • Save ldamon/c6825ebf2a052ffa3311 to your computer and use it in GitHub Desktop.

Select an option

Save ldamon/c6825ebf2a052ffa3311 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.0.rc.1)
// ----
@mixin comprehension-highlight($content-type, $element-type) {
$comprehensions: weak, fair, strong;
&.#{$content-type} {
table {
@each $comprehension in $comprehensions {
&.#{$comprehension} {
#{$element-type} {
box-shadow: inset 0 0 0 10px unquote("$#{$comprehension}");
}
}
}
}
}
&.#{$content-type} {
figure {
@each $comprehension in $comprehensions {
&.#{$comprehension} {
#{$element-type} {
box-shadow: inset 0 0 0 10px unquote("$#{$comprehension}");
}
}
}
}
}
}
.studybit {
@include comprehension-highlight (text, figure);
@include comprehension-highlight (text, table);
@include comprehension-highlight (image, table)
}
.studybit.text table.weak figure {
box-shadow: inset 0 0 0 10px $weak;
}
.studybit.text table.fair figure {
box-shadow: inset 0 0 0 10px $fair;
}
.studybit.text table.strong figure {
box-shadow: inset 0 0 0 10px $strong;
}
.studybit.text figure.weak figure {
box-shadow: inset 0 0 0 10px $weak;
}
.studybit.text figure.fair figure {
box-shadow: inset 0 0 0 10px $fair;
}
.studybit.text figure.strong figure {
box-shadow: inset 0 0 0 10px $strong;
}
.studybit.text table.weak table {
box-shadow: inset 0 0 0 10px $weak;
}
.studybit.text table.fair table {
box-shadow: inset 0 0 0 10px $fair;
}
.studybit.text table.strong table {
box-shadow: inset 0 0 0 10px $strong;
}
.studybit.text figure.weak table {
box-shadow: inset 0 0 0 10px $weak;
}
.studybit.text figure.fair table {
box-shadow: inset 0 0 0 10px $fair;
}
.studybit.text figure.strong table {
box-shadow: inset 0 0 0 10px $strong;
}
.studybit.image table.weak table {
box-shadow: inset 0 0 0 10px $weak;
}
.studybit.image table.fair table {
box-shadow: inset 0 0 0 10px $fair;
}
.studybit.image table.strong table {
box-shadow: inset 0 0 0 10px $strong;
}
.studybit.image figure.weak table {
box-shadow: inset 0 0 0 10px $weak;
}
.studybit.image figure.fair table {
box-shadow: inset 0 0 0 10px $fair;
}
.studybit.image figure.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