Skip to content

Instantly share code, notes, and snippets.

@Undistraction
Created July 29, 2015 20:47
Show Gist options
  • Save Undistraction/6e9d96de026d087dda19 to your computer and use it in GitHub Desktop.
Save Undistraction/6e9d96de026d087dda19 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<img srcset="/assets/paperclip/full/video.png 610w,/assets/paperclip/full/video.png 300w">
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// ----
@mixin when-inside($context_list...) {
$strings: '';
@each $context in $context_list {
$strings: $strings + "#{$context} &,"
}
#{$strings}{
@content
}
}
.Test2 {
//.public.pages-controller.about-page
@include when-inside('.public.pages-controller.home-page', '.public.pages-controller.about-page') {
color: red;
}
}
.public.pages-controller.home-page .Test2, .public.pages-controller.about-page .Test2 {
color: red;
}
<img srcset="/assets/paperclip/full/video.png 610w,/assets/paperclip/full/video.png 300w">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment