Last active
December 21, 2015 17:28
-
-
Save matiassingers/6340278 to your computer and use it in GitHub Desktop.
SASS media query mixin structuring.
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
@mixin galaxyPocket | |
@media only screen and (max-width: 300px) | |
@content |
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
/* Now we just need SASS to combine media queries, or implement something like @buffer: https://github.com/nex3/sass/issues/116 */ | |
.ad-box { | |
color: black; | |
} | |
@media only screen and (max-width: 300px) { | |
.ad-box { | |
padding: 3.5px; | |
} | |
} | |
.ad-box.slim { | |
padding: 7px 21px; | |
} | |
@media only screen and (max-width: 300px) { | |
.ad-box.slim { | |
padding: 3.5px; | |
} | |
} |
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
@import "media-queries" | |
$standard-padding: 7px | |
.ad-box | |
color: black | |
@include galaxyPocket | |
padding: $standard-padding / 2 | |
&.slim | |
padding: $standard-padding $standard-padding*3 | |
@include galaxyPocket | |
padding: $standard-padding / 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment