Skip to content

Instantly share code, notes, and snippets.

@andyford
Last active July 12, 2016 11:13
Show Gist options
  • Select an option

  • Save andyford/f227289ff03f48e216c32429bc5657dd to your computer and use it in GitHub Desktop.

Select an option

Save andyford/f227289ff03f48e216c32429bc5657dd to your computer and use it in GitHub Desktop.
Because I always forget how to do it...
$table-rounded-border-color-outer: #ccc;
$table-rounded-border-color-inner: #ddd;
$table-rounded-border-radius: 5px;
.table-rounded {
border-collapse: separate;
border: 1px solid $table-rounded-border-color-outer;
border-width: 1px 0 0 1px;
border-radius: $table-rounded-border-radius;
td,
th {
border: 1px solid $table-rounded-border-color-inner;
border-width: 0 1px 1px 0;
}
thead th:first-child {
border-radius: $table-rounded-border-radius 0 0 0;
}
thead th:last-child {
border-right-color: $table-rounded-border-color-outer;
border-radius: 0 $table-rounded-border-radius 0 0;
}
tbody {
tr:last-child td {
border-bottom-color: $table-rounded-border-color-outer;
}
tr td:last-child {
border-right-color: $table-rounded-border-color-outer;
}
tr:last-child td:first-child {
border-radius: 0 0 0 $table-rounded-border-radius;
}
tr:last-child td:last-child {
border-radius: 0 0 $table-rounded-border-radius 0;
border-color: $table-rounded-border-color-outer;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment