From 7e4bc12b3fe9b7364940915ec56b4271b9b53ec1 Mon Sep 17 00:00:00 2001 From: Piotr Banaszkiewicz Date: Sat, 14 Feb 2015 11:56:02 +0100 Subject: [PATCH] swc.css: Add striped rows to tables Now the style is matching closely `.table-bordered` from Bootstrap. I decided to leave the header row background blank because it was too close in color to `#F9F9F9` - our new rule for even rows in the table. I also increased horizontal padding by 5px on both sides, because now that we have vertical borders it was too cramped. Additionaly I introduced borders for every cell in the table. --- css/swc.css | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/css/swc.css b/css/swc.css index d68dcb6..b10ebf5 100644 --- a/css/swc.css +++ b/css/swc.css @@ -466,17 +466,31 @@ section.content { font-size: 40pt; } -thead .header { - background: rgba(0, 0, 0, 0.15); +table { + margin-bottom: 15px; } table th, table td { - padding: 5px; + padding: 5px 10px; } -table { - border: 1px solid rgba(0, 0, 0, 0.15); - margin-bottom: 15px; +table > thead > .header { + background: transparent; +} + +table > thead > tr > td, table > thead > tr > th, +table > tbody > tr > td, table > tbody > tr > th, +table > tfoot > tr > td, table > tfoot > tr > th { + border: 1px solid #DDD; +} + +table > thead > tr > th, +table > thead > tr > td { + border-bottom-width: 2px; +} + +table tbody > tr:nth-of-type(2n+1) { + background-color: #F9F9F9; } #header-text {