From 28e7751dbec35ea2d18e18d9fd8d6b2ddcfe287b Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Thu, 15 May 2014 12:12:23 +0100 Subject: [PATCH] Integration - bootstrap: Better support for table-bordered * Bootstrap has changed how it styles its borders to use border-collapse:collapse, which is unfortunate sas it makes column width calculations to align columns in scrolling tables simply impossible. We need to add styles to make sure the borders are separate but look collapsed. --- .../bootstrap/3/dataTables.bootstrap.css | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/integration/bootstrap/3/dataTables.bootstrap.css b/integration/bootstrap/3/dataTables.bootstrap.css index c9701f8..6c8251c 100644 --- a/integration/bootstrap/3/dataTables.bootstrap.css +++ b/integration/bootstrap/3/dataTables.bootstrap.css @@ -31,7 +31,6 @@ div.dataTables_paginate ul.pagination { white-space: nowrap; } -table.dataTable, table.dataTable td, table.dataTable th { -webkit-box-sizing: content-box; @@ -100,6 +99,31 @@ div.dataTables_scrollFoot table { border-top: none; } +/* Frustratingly the border-collapse:collapse used by Bootstrap makes the column + width calculations when using scrolling impossible to align columns. We have + to use separate + */ +table.table-bordered.dataTable { + border-collapse: separate !important; +} +table.table-bordered thead th, +table.table-bordered thead td { + border-left-width: 0; + border-top-width: 0; +} +table.table-bordered tbody th, +table.table-bordered tbody td { + border-left-width: 0; + border-bottom-width: 0; +} +table.table-bordered th:last-child, +table.table-bordered td:last-child { + border-right-width: 0; +} +div.dataTables_scrollHead table.table-bordered { + border-bottom-width: 0; +} + @@ -212,7 +236,7 @@ div.DTFC_LeftHeadWrapper table thead tr:last-child td:first-child { div.DTFC_RightBodyWrapper table, div.DTFC_LeftBodyWrapper table { border-top: none; - margin-bottom: 0 !important; + margin: 0 !important; } div.DTFC_RightBodyWrapper tbody tr:first-child th, @@ -226,3 +250,12 @@ div.DTFC_RightFootWrapper table, div.DTFC_LeftFootWrapper table { border-top: none; } + + +/* + * FixedHeader styles + */ +div.FixedHeader_Cloned table { + margin: 0 !important +} +