Skip to content

Instantly share code, notes, and snippets.

@bookwyrm
Last active August 29, 2015 14:18
Show Gist options
  • Save bookwyrm/69944ffbfb0f13285065 to your computer and use it in GitHub Desktop.
Save bookwyrm/69944ffbfb0f13285065 to your computer and use it in GitHub Desktop.
OPGWdr
@mixin js--enabled() {
@at-root html.js #{&} {
@content;
}
}
@mixin js--disabled() {
@at-root html.no-js #{&} {
@content
}
}
%div.container
%span.with-js JS is available
%span.without-js JS is not available
@mixin js--enabled() {
@at-root html.js #{&} {
@content;
}
}
@mixin js--disabled() {
@at-root html.no-js #{&} {
@content
}
}
.container {
padding: 30px;
.with-js, .without-js {
display: none;
}
@include js--enabled() {
.with-js {
display: block;
}
}
@include js--disabled() {
.without-js {
display: block;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment