This commit is contained in:
Benjamin Beganović 2020-11-05 14:47:24 +01:00
parent bb76cec267
commit d9f915bb37

View File

@ -70,36 +70,43 @@
margin: 3rem 1.5rem; margin: 3rem 1.5rem;
} }
#product-table { #product-table,
#task-table {
min-width: 100%; min-width: 100%;
table-layout: fixed; table-layout: fixed;
overflow-wrap: break-word; overflow-wrap: break-word;
} }
#product-table > thead { #product-table > thead,
#task-table > thead {
text-align: left; text-align: left;
} }
#product-table > thead > tr > th { #product-table > thead > tr > th,
#task-table > thead > tr > th {
padding: 0.8rem; padding: 0.8rem;
background-color: var(--secondary-color); background-color: var(--secondary-color);
color: white; color: white;
} }
#product-table > thead > tr > th:last-child { #product-table > thead > tr > th:last-child,
#task-table > thead > tr > th:last-child {
text-align: right; text-align: right;
} }
#product-table > tbody > tr > td { #product-table > tbody > tr > td,
#task-table > tbody > tr > td {
border-bottom: 1px solid var(--secondary-color); border-bottom: 1px solid var(--secondary-color);
padding: 1rem; padding: 1rem;
} }
#product-table > tbody > tr > td:first-child { #product-table > tbody > tr > td:first-child,
#task-table > tbody > tr > td:first-child {
font-weight: bold; font-weight: bold;
} }
#product-table > tbody > tr > td:last-child { #product-table > tbody > tr > td:last-child,
#task-table > tbody > tr > td:last-child {
text-align: right; text-align: right;
} }
@ -134,11 +141,11 @@
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
} }
#product-table-footer { #table-totals {
page-break-inside: avoid; page-break-inside: avoid;
} }
#product-table-footer > * { #table-totals > * {
display: grid; display: grid;
grid-template-columns: 3fr 1fr 1fr; grid-template-columns: 3fr 1fr 1fr;
margin-top: 0.5rem; margin-top: 0.5rem;
@ -146,26 +153,26 @@
margin-left: 1.5rem; margin-left: 1.5rem;
} }
#product-table-footer #table-totals
> * > *
[data-element='product-table-balance-due-label'], [data-element='product-table-balance-due-label'],
#product-table-footer #table-totals
> * > *
[data-element='product-table-balance-due'] { [data-element='product-table-balance-due'] {
font-weight: bold; font-weight: bold;
font-size: 1.3rem; font-size: 1.3rem;
} }
#product-table-footer > * > * { #table-totals > * > * {
padding-left: 1.5rem; padding-left: 1.5rem;
} }
#product-table-footer > * > :last-child { #table-totals > * > :last-child {
text-align: right; text-align: right;
padding-right: 1rem; padding-right: 1rem;
} }
#product-table-footer > *:last-child { #table-totals > *:last-child {
background-color: var(--secondary-color); background-color: var(--secondary-color);
color: white; color: white;
padding-top: 0.7rem; padding-top: 0.7rem;
@ -227,9 +234,10 @@
<div class="table-wrapper"> <div class="table-wrapper">
<table id="product-table" cellspacing="0"></table> <table id="product-table" cellspacing="0"></table>
<table id="task-table" cellspacing="0"></table>
</div> </div>
<div id="product-table-footer" cellspacing="0"></div> <div id="table-totals" cellspacing="0"></div>
</td> </td>
</tr> </tr>
</tbody> </tbody>