Created
February 20, 2019 01:59
-
-
Save fahimalizain/8ad34ebde12c6e01c0962cb75091b8e3 to your computer and use it in GitHub Desktop.
Negate bootstrap .container fixed widths. This helps to span any element across the screen, even though its inside a .container without using position absolute or fixed
This file contains 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
.spread-screen { | |
width: 100vh; | |
// bootstrap 4 | |
// the following are referenced from bootstrap.scss/_grid.scss | |
// mixins/_grid.scss @make-container @make-container-max-widths mixins | |
margin-left: -$spacer; | |
@each $breakpoint, $container-max-width in $container-max-widths { | |
@include media-breakpoint-up($breakpoint, $grid-breakpoints) { | |
margin-left: calc(-1 * (((100vw - #{$container-max-width}) / 2) + (#{$grid-gutter-width} / 2))); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment