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

48 lines
1.0 KiB
SCSS
Raw Normal View History

@import "variables.scss";
@import "mixins.scss";
$margin-width: 30rem;
2020-07-15 13:18:34 -07:00
$margin-inner-offset: 0.5rem;
$margin-outer-offset: 1rem;
@mixin below-two-margins {
@media screen and
2020-07-15 13:13:47 -07:00
(max-width: $container-width-threshold +
2 * ($margin-width + $margin-inner-offset + $margin-outer-offset)) {
@content;
}
}
@mixin below-one-margin {
@media screen and
2020-07-15 13:13:47 -07:00
(max-width: $container-width-threshold +
($margin-width + $margin-inner-offset + $margin-outer-offset)) {
@content;
}
}
@mixin margin-content {
display: block;
position: absolute;
width: $margin-width;
box-sizing: border-box;
}
@mixin margin-content-left {
left: 0;
2020-07-15 13:13:47 -07:00
margin-left: -($margin-width + $container-min-padding + $margin-inner-offset);
2020-06-30 21:22:19 -07:00
@include below-two-margins {
display: none;
}
}
@mixin margin-content-right {
right: 0;
2020-07-15 13:13:47 -07:00
margin-right: -($margin-width + $container-min-padding + $margin-inner-offset);
2020-06-30 21:22:19 -07:00
@include below-one-margin {
display: none;
}
}