diff --git a/docs/assets/bootstrap.zip b/docs/assets/bootstrap.zip
index 566d3e6217..6262fbb6cf 100644
Binary files a/docs/assets/bootstrap.zip and b/docs/assets/bootstrap.zip differ
diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css
index f4d2dbe378..bdf6a771ff 100644
--- a/docs/assets/css/bootstrap.css
+++ b/docs/assets/css/bootstrap.css
@@ -1237,6 +1237,12 @@ table {
.table-bordered td {
border-left: 1px solid #dddddd;
}
+.table-bordered caption + thead tr:first-child th,
+.table-bordered caption + tbody tr:first-child th,
+.table-bordered caption + tbody tr:first-child td,
+.table-bordered colgroup + thead tr:first-child th,
+.table-bordered colgroup + tbody tr:first-child th,
+.table-bordered colgroup + tbody tr:first-child td,
.table-bordered thead:first-child tr:first-child th,
.table-bordered tbody:first-child tr:first-child th,
.table-bordered tbody:first-child tr:first-child td {
diff --git a/docs/css-tests.html b/docs/css-tests.html
index 3eeac59243..6dcec97985 100644
--- a/docs/css-tests.html
+++ b/docs/css-tests.html
@@ -74,13 +74,193 @@
+
+
+
+
+
+
+
Bordered without thead
+
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+
+
Bordered without thead, with caption
+
+ Table caption
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+
+
Bordered without thead, with colgroup
+
+
+
+
+
+
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+
+
Bordered with thead, with colgroup
+
+
+
+
+
+
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+
+
+
+
Bordered with thead and caption
+
+ Table caption
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+
+
Bordered with rowspan and colspan
+
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+
+
+ 1 and 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 3 |
+
+
+ 2 and 3 |
+
+
+
+
+
+
diff --git a/docs/templates/pages/css-tests.mustache b/docs/templates/pages/css-tests.mustache
index 6455039c42..cde7484dc4 100644
--- a/docs/templates/pages/css-tests.mustache
+++ b/docs/templates/pages/css-tests.mustache
@@ -1,6 +1,186 @@
+
+
+
+
+
+
+
+
Bordered without thead
+
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+
+
Bordered without thead, with caption
+
+ Table caption
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+
+
Bordered without thead, with colgroup
+
+
+
+
+
+
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+
+
Bordered with thead, with colgroup
+
+
+
+
+
+
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+
+
+
+
Bordered with thead and caption
+
+ Table caption
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+
+
Bordered with rowspan and colspan
+
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+
+
+ 1 and 2 |
+ 3 |
+
+
+ 1 |
+ 2 |
+ 3 |
+
+
+ 1 |
+ 3 |
+
+
+ 2 and 3 |
+
+
+
+
+
diff --git a/less/tables.less b/less/tables.less
index 5ce876f4a0..cdc794edce 100644
--- a/less/tables.less
+++ b/less/tables.less
@@ -78,6 +78,12 @@ table {
border-left: 1px solid @tableBorder;
}
// Prevent a double border
+ caption + thead tr:first-child th,
+ caption + tbody tr:first-child th,
+ caption + tbody tr:first-child td,
+ colgroup + thead tr:first-child th,
+ colgroup + tbody tr:first-child th,
+ colgroup + tbody tr:first-child td,
thead:first-child tr:first-child th,
tbody:first-child tr:first-child th,
tbody:first-child tr:first-child td {