Skip to content

Instantly share code, notes, and snippets.

@ltackett
Created March 30, 2011 16:28
Show Gist options
  • Save ltackett/894734 to your computer and use it in GitHub Desktop.
Save ltackett/894734 to your computer and use it in GitHub Desktop.
inset-border.sass
@import compass/css3/box-shadow
=inset-border($direction, $border-color: #333, $highlight-color: #fff, $highlight-opacity: 0.9, $border-width: 1px, $border-style: solid)
@if $direction == "left"
+box-shadow(rgba($highlight-color, $highlight-opacity), -1px, 0, 0, 0)
@if $direction == "right"
+box-shadow(rgba($highlight-color, $highlight-opacity), 1px, 0, 0, 0)
@if $direction == "top"
+box-shadow(rgba($highlight-color, $highlight-opacity), 0, 1px, 0, 0, inset)
@if $direction == "bottom"
+box-shadow(rgba($highlight-color, $highlight-opacity), 0, 1px, 0, 0)
border:
#{$direction}:
width: $border-width
style: $border-style
color: $border-color
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment