Skip to content

Instantly share code, notes, and snippets.

@jchaney01
Created July 25, 2013 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jchaney01/6082530 to your computer and use it in GitHub Desktop.
Save jchaney01/6082530 to your computer and use it in GitHub Desktop.
Sass Mixin to produce even table borders. Table borders get doubled up when a border is simply applied to a table element. This will do it in isolate.
@mixin perfectTableBorders($color, $width){
tr{&:last-child{border-bottom: $width solid $color;}
border-top: $width solid $color;
}
td{&:first-child{border-left: $width solid $color;}
border-right: $width solid $color;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment