Last active
August 29, 2015 14:07
-
-
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
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
=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