A Pen by Matt Vanderpol on CodePen.
Last active
August 29, 2015 14:18
-
-
Save bookwyrm/69944ffbfb0f13285065 to your computer and use it in GitHub Desktop.
OPGWdr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin js--enabled() { | |
@at-root html.js #{&} { | |
@content; | |
} | |
} | |
@mixin js--disabled() { | |
@at-root html.no-js #{&} { | |
@content | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%div.container | |
%span.with-js JS is available | |
%span.without-js JS is not available |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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