Skip to content

Instantly share code, notes, and snippets.

@micahgodbolt
Created March 17, 2015 16:00
Show Gist options
  • Save micahgodbolt/03413963bed00f00a92b to your computer and use it in GitHub Desktop.
Save micahgodbolt/03413963bed00f00a92b to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
@mixin text($extend, $themes...) {
@extend %#{$extend};
$class: unique-id();
@at-root {
%#{$class} {
color: color(white);
}
}
@if length($themes) == 0 {
$themes: 'dark', 'black';
}
@each $theme in $themes {
[data-rh-theme="#{$theme}"] & {
@extend %#{$class};
}
}
}
%header {
color: blue;
}
div {
@include text(header);
}
div {
color: blue;
}
[data-rh-theme="dark"] div, [data-rh-theme="black"] div {
color: color(white);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment