Created
December 4, 2017 16:06
-
-
Save tomfordweb/941bac8121025f41a72e3c66c94ad2a2 to your computer and use it in GitHub Desktop.
Sassy Full Width Bars
This file contains hidden or 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
// taken from | |
// https://css-tricks.com/full-browser-width-bars/ | |
@mixin full-width-bar($background) { | |
position: relative; /* for the child pseudo-elements */ | |
/* negative offset = section padding */ | |
margin: 0 -30px; | |
/* add back section padding value */ | |
padding: 0.25rem 30px; | |
background: $background; | |
&:before, &:after { | |
content: ""; | |
position: absolute; | |
/* fill vertically */ | |
top: 0; | |
bottom: 0; | |
width: 9600px; | |
right: 100%; | |
background: $background | |
} | |
&:after { | |
width: 320px; | |
left: 100%; | |
/* you're free to do something totally different here */ | |
background: $background | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment