Created
August 6, 2019 20:40
-
-
Save jeremyHixon/0096306e18821afd2c434fa838cb4401 to your computer and use it in GitHub Desktop.
This is the SCSS I used to make the .alignfull and .alignwide play nicely with Bootstrap
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
// Same styles for small devices | |
.alignfull, .alignwide { | |
margin: 0 calc( 50% - 50vw ) $alignment-margin; | |
max-width: 100vw; | |
width: 100vw; | |
} | |
// At "medium" breakpoint it moves to fill in half the viewport's whitespace | |
@media ( min-width: map-get( $grid-breakpoints, md ) ) { | |
.alignwide { | |
margin: 0 calc( ( ( ( 100vw - 100% ) / 2 ) / 2 ) * -1 ) $alignment-margin; | |
max-width: calc( 100% + ( ( 100vw - 100% ) / 2 ) ); | |
width: calc( 100% + ( ( 100vw - 100% ) / 2 ) ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment