Skip to content

Instantly share code, notes, and snippets.

@thaicloud
Last active June 29, 2016 17:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thaicloud/b93cce9f474c23778259 to your computer and use it in GitHub Desktop.
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)
@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