Skip to content

Instantly share code, notes, and snippets.

@antsa
Created June 8, 2011 20:07
Show Gist options
  • Save antsa/1015272 to your computer and use it in GitHub Desktop.
Save antsa/1015272 to your computer and use it in GitHub Desktop.
// A sass @mixin to create the body border effect
// with pseudo elements as described by CSS-Tricks:
// http://css-tricks.com/body-border/
@mixin bodyborder($color, $width) {
body {
border-left: $width solid $color;
border-right: $width solid $color;
&:before, &:after {
content: "";
position: fixed;
background: $color;
height: $width;
left: 0;
right: 0;
}
&:before {
top: 0;
}
&:after {
bottom: 0;
}
}
}
// usage
// @include bodyborder(#900, 10px);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment