// Tables in panels // // Place a non-bordered `.table` within a panel (not within a `.panel-body`) and // watch it go full width. .panel { > .table, > .table-responsive > .table, > .panel-collapse > .table { margin-bottom: 0; caption { padding-left: $space-large; padding-right: $space-large; } } // Add border top radius for first one > .table:first-child, > .table-responsive:first-child > .table:first-child { @include border-top-radius(($border-rad-light - 1)); > thead:first-child, > tbody:first-child { > tr:first-child { border-top-left-radius: ($border-rad-light - 1); border-top-right-radius: ($border-rad-light - 1); td:first-child, th:first-child { border-top-left-radius: ($border-rad-light - 1); } td:last-child, th:last-child { border-top-right-radius: ($border-rad-light - 1); } } } } // Add border bottom radius for last one > .table:last-child, > .table-responsive:last-child > .table:last-child { @include border-bottom-radius(($border-rad-light - 1)); > tbody:last-child, > tfoot:last-child { > tr:last-child { border-bottom-left-radius: ($border-rad-light - 1); border-bottom-right-radius: ($border-rad-light - 1); td:first-child, th:first-child { border-bottom-left-radius: ($border-rad-light - 1); } td:last-child, th:last-child { border-bottom-right-radius: ($border-rad-light - 1); } } } } > .panel-body + .table, > .panel-body + .table-responsive, > .table + .panel-body, > .table-responsive + .panel-body { border-top: 1px solid $border-color; } > .table > tbody:first-child > tr:first-child th, > .table > tbody:first-child > tr:first-child td { border-top: 0; } > .table-bordered, > .table-responsive > .table-bordered { border: 0; > thead, > tbody, > tfoot { > tr { > th:first-child, > td:first-child { border-left: 0; } > th:last-child, > td:last-child { border-right: 0; } } } > thead, > tbody { > tr:first-child { > td, > th { border-bottom: 0; } } } > tbody, > tfoot { > tr:last-child { > td, > th { border-bottom: 0; } } } } > .table-responsive { border: 0; margin-bottom: 0; } }