Created
June 8, 2011 20:07
-
-
Save antsa/1015272 to your computer and use it in GitHub Desktop.
This file contains 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
// 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