Created
July 15, 2015 14:51
-
-
Save adamduncan/68e8c23bba2c3f2bb864 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com. Example of @extending into classes instead of nested media queries.
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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
$doc-font-size: 16; /* 16px */ | |
$lap: 600; | |
$desk: 900; | |
@mixin mq($point, $constraint: min, $feature: width) { | |
@media screen and (#{$constraint}-#{$feature}: $point / $doc-font-size + em) { | |
@content; | |
} | |
} | |
.media-wrap--3-2 { | |
padding-top: 66.66%; | |
} | |
.media-wrap--letterbox { | |
padding-top: 66.66%; | |
@include mq($lap) { | |
padding-top: 25%; | |
} | |
} | |
.module-info__media-wrap { | |
@extend .media-wrap--3-2; | |
} | |
.module-promo__media-wrap { | |
@extend .media-wrap--letterbox; | |
} |
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
/* 16px */ | |
.media-wrap--3-2, .module-info__media-wrap { | |
padding-top: 66.66%; | |
} | |
.media-wrap--letterbox, .module-promo__media-wrap { | |
padding-top: 66.66%; | |
} | |
@media screen and (min-width: 37.5em) { | |
.media-wrap--letterbox, .module-promo__media-wrap { | |
padding-top: 25%; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment