From 229629bda3513be3792a185a8e43cab507f4b3cb Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 3 Oct 2017 16:56:19 +0200 Subject: [PATCH] Fix #8 --- form.scss | 4 +++ styles.css | 83 ++++++++++++++++++++++++++---------------------------- table.scss | 71 ++++++++++++++++++++++++---------------------- 3 files changed, 82 insertions(+), 76 deletions(-) diff --git a/form.scss b/form.scss index 510cf5e..ba5eed2 100644 --- a/form.scss +++ b/form.scss @@ -32,6 +32,10 @@ form { height: 100%; background: #bebebe; } + + table.layout { + table-layout: fixed; + } .layout td+td { padding-left: 5px; diff --git a/styles.css b/styles.css index 2bc79c9..7cf00d4 100644 --- a/styles.css +++ b/styles.css @@ -4744,16 +4744,18 @@ table.table { table.table .empty { text-align: center; color: #d8d8d8; } - table.table tfoot label { - float: left; } - table.table tfoot select { - width: auto; - float: right; - margin: 0; - min-width: 0px; } - table.table tfoot td { - text-align: center; - padding-top: 10px; } + table.table tfoot { + border: none; } + table.table tfoot label { + float: left; } + table.table tfoot select { + width: auto; + float: right; + margin: 0; + min-width: 0px; } + table.table tfoot td { + text-align: center; + padding-top: 10px; } table.list th { text-align: left; } @@ -4764,39 +4766,34 @@ table.list td { table.table { border: 0; width: 100%; } - - table.table thead { - display: none; } - - table.table tr { - display: block; - margin-bottom: .625em; } - - table.table td { - border-left: 1px solid #b7b7b7; - border-right: 1px solid #b7b7b7; - display: block; - font-size: .8rem; - text-align: right; - position: relative; - height: 2rem; - line-height: 2rem; } - - table.table td:before { - content: attr(data-label); - position: absolute; - left: 0; - top: 50%; - transform: translateY(-50%); - margin-left: 20px; - font-weight: bold; - display: inline-block; } - - table.table td:last-child { - border-bottom: 1px solid #b7b7b7; } - - table.table tbody tr { - height: auto; } } + table.table thead { + display: none; } + table.table tbody tr { + height: auto; + display: block; + margin-bottom: .625em; } + table.table tbody tr:last-child td { + border-bottom: none; } + table.table tbody tr:last-child td:last-child { + border-bottom: 1px solid #b7b7b7; } + table.table tbody td { + border-left: 1px solid #b7b7b7; + border-right: 1px solid #b7b7b7; + display: block; + font-size: .8rem; + text-align: right; + position: relative; + height: 2rem; + line-height: 2rem; } + table.table tbody td:before { + content: attr(data-label); + position: absolute; + left: 0; + top: 50%; + transform: translateY(-50%); + margin-left: 20px; + font-weight: bold; + display: inline-block; } } .nobreak { white-space: nowrap; } diff --git a/table.scss b/table.scss index 649d105..198da1d 100644 --- a/table.scss +++ b/table.scss @@ -118,6 +118,8 @@ table.table { } tfoot { + border: none; + label { float: left; } @@ -150,45 +152,48 @@ table.list { table.table { border: 0; width: 100%; - } - table.table thead { - display: none; - } + thead { + display: none; + } - table.table tr { - display: block; - margin-bottom: .625em; - } + tbody { + tr { + height: auto; + display: block; + margin-bottom: .625em; - table.table td { - border-left: 1px solid $content-border-color; - border-right: 1px solid $content-border-color; - display: block; - font-size: .8rem; - text-align: right; - position: relative; - height: 2rem; - line-height: 2rem; - } + &:last-child td { + border-bottom: none; - table.table td:before { - content: attr(data-label); - position: absolute; - left: 0; - top: 50%; - transform: translateY(-50%); - margin-left: 20px; - font-weight: bold; - display: inline-block; - } + &:last-child { + border-bottom: 1px solid $content-border-color; + } + } + } - table.table td:last-child { - border-bottom: 1px solid $content-border-color; - } + td { + border-left: 1px solid $content-border-color; + border-right: 1px solid $content-border-color; + display: block; + font-size: .8rem; + text-align: right; + position: relative; + height: 2rem; + line-height: 2rem; - table.table tbody tr { - height: auto; + &:before { + content: attr(data-label); + position: absolute; + left: 0; + top: 50%; + transform: translateY(-50%); + margin-left: 20px; + font-weight: bold; + display: inline-block; + } + } + } } }