Created
June 13, 2012 11:41
-
-
Save nickawalsh/2923581 to your computer and use it in GitHub Desktop.
Pseudo Caret
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
/* Sample usage: +caret(bottom, 8px, #000); */ | |
=caret($side, $size, $color) | |
$opposite: opposite-position($side) | |
+stretch(50%,auto,auto,50%) | |
border: $size solid transparent | |
border-#{$opposite}: $size solid $color | |
border-#{$side}: 0 | |
content: '' | |
display: block | |
height: 0 | |
margin: (-$size) 0 0 (-$size) | |
margin-#{$side}: 0 | |
width: 0 | |
#{$side}: -$size | |
#{$opposite}: auto |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requires Compass to have
opposite-position
andstretch
available.