blog-static/themes/vanilla/assets/scss/margin.scss

47 lines
880 B
SCSS
Raw Normal View History

@import "variables.scss";
@import "mixins.scss";
$margin-width: 30rem;
$margin-offset: 1.5rem;
@mixin below-two-margins {
@media screen and
(max-width: $container-width +
2 * ($margin-width + 2 * $margin-offset)) {
@content;
}
}
@mixin below-one-margin {
@media screen and
(max-width: $container-width +
($margin-width + 3 * $margin-offset)) {
@content;
}
}
@mixin margin-content {
display: block;
position: absolute;
width: $margin-width;
box-sizing: border-box;
}
@mixin margin-content-left {
left: 0;
margin-left: -($margin-width + $margin-offset);
2020-06-30 21:22:19 -07:00
@include below-two-margins {
display: none;
}
}
@mixin margin-content-right {
right: 0;
margin-right: -($margin-width + $margin-offset);
2020-06-30 21:22:19 -07:00
@include below-one-margin {
display: none;
}
}