Created
January 27, 2015 06:09
-
-
Save ruedap/c632a36cb21d30a36566 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains 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
.block | |
.block__element foo | |
.is--responsive | |
.block | |
.block__element bar |
This file contains 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
// ---- | |
// Sass (v3.4.9) | |
// Compass (v1.0.1) | |
// ---- | |
=media($target) | |
.is--responsive & | |
@if $target == mobile | |
@media screen and (max-width: 767px) | |
@content | |
@if $target == tablet | |
@media screen and (min-width: 768px) | |
@content | |
.block | |
&__element | |
color: red | |
+media(mobile) | |
color: green | |
+media(tablet) | |
color: blue |
This file contains 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
.block__element { | |
color: red; | |
} | |
@media screen and (max-width: 767px) { | |
.is--responsive .block__element { | |
color: green; | |
} | |
} | |
@media screen and (min-width: 768px) { | |
.is--responsive .block__element { | |
color: blue; | |
} | |
} |
This file contains 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 class='block'> | |
<div class='block__element'>foo</div> | |
</div> | |
<div class='is--responsive'> | |
<div class='block'> | |
<div class='block__element'>bar</div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment