Skip to content

Instantly share code, notes, and snippets.

@dmitry-ilyashevich
Created August 4, 2014 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmitry-ilyashevich/f2a27d6d0b1c24441ea1 to your computer and use it in GitHub Desktop.
Save dmitry-ilyashevich/f2a27d6d0b1c24441ea1 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.0.rc.1)
// Compass (v1.0.0.alpha.20)
// ----
@mixin context($old-context, $new-contexts...) {
@each $context in $new-contexts {
@at-root #{selector-replace(&, $old-context, $context)} {
@content;
}
}
}
.tabs {
.tab {
background: red;
&:hover {
background: white;
}
.tab-link {
color: white;
@include context('.tab', '.tab:hover', '.tab.active') {
color: red;
}
}
}
}
.tabs .tab {
background: red;
}
.tabs .tab:hover {
background: white;
}
.tabs .tab .tab-link {
color: white;
}
.tabs .tab:hover .tab-link {
color: red;
}
.tabs .tab.active .tab-link {
color: red;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment