Last active
June 29, 2016 17:16
-
-
Save thaicloud/b93cce9f474c23778259 to your computer and use it in GitHub Desktop.
Sass mixin for full-width element (for use when inside a non-full-width container)
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
@mixin full-width($bgcolor: #fff) { | |
position: relative; | |
&:before, &:after { | |
content: ""; | |
position: absolute; | |
background: $bgcolor; | |
top: 0; | |
bottom: 0; | |
width: 9999px; | |
} | |
&:before { | |
right: 100%; | |
} | |
&:after { | |
left: 100%; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment