2017-03-09 13:16:08 -05:00
|
|
|
// Media query
|
|
|
|
|
|
|
|
// Media query mixin
|
|
|
|
// Usage:
|
|
|
|
// @include mq(md) {
|
|
|
|
// ..medium and up styles
|
|
|
|
// }
|
|
|
|
@mixin mq($name) {
|
|
|
|
// Retrieves the value from the key
|
|
|
|
$value: map-get($media-queries, $name);
|
|
|
|
|
|
|
|
// If the key exists in the map
|
|
|
|
@if $value != null {
|
|
|
|
// Prints a media query based on the value
|
|
|
|
@media (min-width: rem($value)) {
|
|
|
|
@content;
|
|
|
|
}
|
2020-04-24 11:44:37 -04:00
|
|
|
} @else {
|
2017-03-09 13:16:08 -05:00
|
|
|
@warn "No value could be retrieved from `#{$media-query}`. "
|
2018-10-25 11:17:10 -04:00
|
|
|
+ "Please make sure it is defined in `$media-queries` map.";
|
2017-03-09 13:16:08 -05:00
|
|
|
}
|
|
|
|
}
|
2017-03-24 09:47:37 -04:00
|
|
|
|
|
|
|
// Responsive container
|
|
|
|
|
|
|
|
@mixin container {
|
|
|
|
padding-right: $gutter-spacing-sm;
|
2018-10-25 11:17:10 -04:00
|
|
|
padding-left: $gutter-spacing-sm;
|
2017-03-24 09:47:37 -04:00
|
|
|
|
|
|
|
@include mq(md) {
|
|
|
|
padding-right: $gutter-spacing;
|
2018-10-25 11:17:10 -04:00
|
|
|
padding-left: $gutter-spacing;
|
2017-03-24 09:47:37 -04:00
|
|
|
}
|
|
|
|
}
|