Fix table header spacing when status is hidden

This commit is contained in:
Pau Perez
2021-02-22 11:43:46 +01:00
committed by Andy Brett
parent ad147ed8f5
commit 2146ed277f
3 changed files with 22 additions and 4 deletions

View File

@@ -146,3 +146,19 @@
table.full {
width: 100%;
}
// Note this relies on the <th> using `.show-for-large-up` as well.
.requiring-authorization tr {
position: relative;
th:last-child {
position: absolute;
// The following calculation is the equivalent of:
//
// $table-cell-padding + 2 * browser's default border-spacing + 2 * table border
//
// Unfortunately we can't use Scss's interpolation
// https://sass-lang.com/documentation/interpolation. We're using a too old version perhaps?
right: calc(12px + 2*2px + 2*1px);
}
}

View File

@@ -1,9 +1,11 @@
$table-cell-padding: 12px;
table {
thead tr, tbody tr {
th, td {
box-sizing: border-box;
padding-left: 12px;
padding-right: 12px;
padding-left: $table-cell-padding;
padding-right: $table-cell-padding;
overflow: hidden;
}
}

View File

@@ -1,7 +1,7 @@
%script{ type: "text/ng-template", id: "account/transactions.html" }
- if @payments_requiring_action.present?
.active_table
%h3.requiring-authorization= t(".authorization_required")
.active_table.requiring-authorization
%h3= t(".authorization_required")
%table.full
%tr
%th= t :transaction