Skip to content

Instantly share code, notes, and snippets.

@GiorgioAresu
Last active August 29, 2015 14:07
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 GiorgioAresu/56692e51294e1077199b to your computer and use it in GitHub Desktop.
Save GiorgioAresu/56692e51294e1077199b to your computer and use it in GitHub Desktop.
Include this SASS snippet to apply a border and a radius to a table. I created this because I was unable to create a nice 1px border with corner radius. You can pass a border style and a radius value to the mixin
=table-border-and-radius($border, $radius)
table
border-collapse: separate
th, td
border-top: $border
border-left: $border
th:first-child
border-top-left-radius: $radius
th:last-child
border-top-right-radius: $radius
th:last-child, td:last-child
border-right: $border
tr:last-child
td:first-child
border-bottom-left-radius: $radius
td:last-child
border-bottom-right-radius: $radius
td
border-bottom: $border
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment