Skip to content

Instantly share code, notes, and snippets.

@tomfordweb
Created December 4, 2017 16:06
Show Gist options
  • Save tomfordweb/941bac8121025f41a72e3c66c94ad2a2 to your computer and use it in GitHub Desktop.
Save tomfordweb/941bac8121025f41a72e3c66c94ad2a2 to your computer and use it in GitHub Desktop.
Sassy Full Width Bars
// 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