From 89d7ec5290912ddd762f743f450b58b865afc6c3 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 19 Jul 2012 21:06:42 -0700 Subject: [PATCH] fixes #4102: properly round top left corners of .table-border with caption/colgroup; also fix css tests page layout and footer --- docs/assets/css/bootstrap.css | 18 ++++++++++++++++++ less/tables.less | 20 ++++++++++++++++++++ less/tests/css-tests.html | 24 +++++++++++++----------- 3 files changed, 51 insertions(+), 11 deletions(-) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 239de594a7..b9ea3b7d0d 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -1803,6 +1803,24 @@ table { -moz-border-radius-bottomright: 4px; } +.table-bordered caption + thead tr:first-child th:first-child, +.table-bordered caption + tbody tr:first-child td:first-child, +.table-bordered colgroup + thead tr:first-child th:first-child, +.table-bordered colgroup + tbody tr:first-child td:first-child { + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; +} + +.table-bordered caption + thead tr:first-child th:last-child, +.table-bordered caption + tbody tr:first-child td:last-child, +.table-bordered colgroup + thead tr:first-child th:last-child, +.table-bordered colgroup + tbody tr:first-child td:last-child { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -moz-border-right-topleft: 4px; +} + .table-striped tbody tr:nth-child(odd) td, .table-striped tbody tr:nth-child(odd) th { background-color: #f9f9f9; diff --git a/less/tables.less b/less/tables.less index 10499a1dbe..4db484062f 100644 --- a/less/tables.less +++ b/less/tables.less @@ -125,9 +125,29 @@ table { border-bottom-right-radius: 4px; -moz-border-radius-bottomright: 4px; } + + // Special fixes to round the left border on the first td/td + caption + thead tr:first-child th:first-child, + caption + tbody tr:first-child td:first-child, + colgroup + thead tr:first-child th:first-child, + colgroup + tbody tr:first-child td:first-child { + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; + } + caption + thead tr:first-child th:last-child, + caption + tbody tr:first-child td:last-child, + colgroup + thead tr:first-child th:last-child, + colgroup + tbody tr:first-child td:last-child { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -moz-border-right-topleft: 4px; + } } + + // ZEBRA-STRIPING // -------------- diff --git a/less/tests/css-tests.html b/less/tests/css-tests.html index fd687ac3a5..527e966163 100644 --- a/less/tests/css-tests.html +++ b/less/tests/css-tests.html @@ -42,17 +42,19 @@ -
-
-

CSS Tests

-

One stop shop for quick debugging and edge-case tests of CSS.

+
+

CSS Tests

+

One stop shop for quick debugging and edge-case tests of CSS.

+
+
+