From 47b8184bbb5784eb373ffbb905c8a1756eba3c6d Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 17 Jan 2012 23:39:18 -0800 Subject: scope table styles to a class, .table, instead of on the generic element as a smarter default --- lib/tables.less | 51 +++++++++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 26 deletions(-) (limited to 'lib') diff --git a/lib/tables.less b/lib/tables.less index 1edd9e3b8..29e1e2d46 100644 --- a/lib/tables.less +++ b/lib/tables.less @@ -4,39 +4,38 @@ // ---------------------------------------- - // BASELINE STYLES // --------------- -table { +.table { width: 100%; margin-bottom: @baseLineHeight; -} -th, -td { - padding: 8px; - line-height: @baseLineHeight; - text-align: left; - border-top: 1px solid #ddd; -} -th { - font-weight: bold; - vertical-align: bottom; -} -td { - vertical-align: top; -} - -// Remove top border from thead by default -thead:first-child tr th, -thead:first-child tr td { - border-top: 0; + // Cells + th, + td { + padding: 8px; + line-height: @baseLineHeight; + text-align: left; + border-top: 1px solid #ddd; + } + th { + font-weight: bold; + vertical-align: bottom; + } + td { + vertical-align: top; + } + // Remove top border from thead by default + thead:first-child tr th, + thead:first-child tr td { + border-top: 0; + } + // Account for multiple tbody instances + tbody + tbody { + border-top: 2px solid #ddd; + } } -// Account for multiple tbody instances -tbody + tbody { - border-top: 2px solid #ddd; -} // CONDENSED TABLE W/ HALF PADDING -- cgit v1.2.3