Created
April 26, 2017 05:41
-
-
Save dmjcomdem/8240e0cfc633a5c96d45b7c4999d6dff to your computer and use it in GitHub Desktop.
Mixin extends
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
@mobile: ~'@media (max-width: 400px) '; | |
@tablet: ~'@media (max-width: 800px) '; | |
.bp(@rules) { | |
@media @mobile { | |
& .mobile { @rules(); } | |
} | |
} | |
.bp2(@point,@rules) { | |
& when( @point = tablet) { | |
@media @tablet { @rules(); } | |
} | |
} | |
body { | |
.bp({width: 50%;}); | |
.bp2(tablet, {width: 100%;}); | |
} | |
// body { | |
// .bp({width: 50%;}); | |
// .bp2(tablet, {width: 100%;}); | |
// } | |
// @media @media (max-width: 400px) { | |
// body .mobile { | |
// width: 50%; | |
// } | |
// } | |
// @media @media (max-width: 800px) { | |
// body { | |
// width: 100%; | |
// } | |
// } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment