Skip to content

Instantly share code, notes, and snippets.

@nickawalsh
Created June 13, 2012 11:41
Show Gist options
  • Save nickawalsh/2923581 to your computer and use it in GitHub Desktop.
Save nickawalsh/2923581 to your computer and use it in GitHub Desktop.
Pseudo Caret
/* 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
@nickawalsh
Copy link
Author

Requires Compass to have opposite-position and stretch available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment