mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-18 15:03:32 -06:00
initial commit
This commit is contained in:
34
_sass/support/mixins/_layout.scss
Normal file
34
_sass/support/mixins/_layout.scss
Normal file
@@ -0,0 +1,34 @@
|
||||
// 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;
|
||||
}
|
||||
} @else {
|
||||
@warn "No value could be retrieved from `#{$media-query}`. "
|
||||
+ "Please make sure it is defined in `$media-queries` map.";
|
||||
}
|
||||
}
|
||||
|
||||
// Responsive container
|
||||
|
||||
@mixin container {
|
||||
padding-left: $gutter-spacing-sm;
|
||||
padding-right: $gutter-spacing-sm;
|
||||
|
||||
@include mq(md) {
|
||||
padding-left: $gutter-spacing;
|
||||
padding-right: $gutter-spacing;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user