From 8d4895a54d9025a769427e167602ec768d85d101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20St=C3=BCckler?= Date: Thu, 22 Oct 2026 12:36:51 +0200 Subject: [PATCH] [Web] Align the table expand control and row checkbox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Center the +/- glyph in the expand control: its line-height (1.25em) was larger than the 1em box, pushing the glyph down. Derive the box's margin-top from its size so it is centered in the row (desktop and the larger mobile variant). - Hide sort arrows on non-orderable headers. The default initial order targets column 0, the expand column, which got a sorting_asc arrow and arrow padding although it cannot be sorted. - Center row checkboxes level with the expand control by using Bootstrap's 0.25em margin-top instead of a fixed 7px. Signed-off-by: Moritz Stückler --- data/web/css/build/013-datatables.css | 17 +++++++++++++++-- data/web/css/build/015-responsive.css | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/data/web/css/build/013-datatables.css b/data/web/css/build/013-datatables.css index 1bc18119e..a0fa34cce 100644 --- a/data/web/css/build/013-datatables.css +++ b/data/web/css/build/013-datatables.css @@ -28,7 +28,8 @@ table.dataTable td.dt-control:before { color: var(--mc-dtr-color); height: 1em; width: 1em; - line-height: 1.25em; + line-height: 1em; + margin-top: calc(-0.5em - 1.5px); border-radius: 0px; box-shadow: none; font-size: 14px; @@ -39,11 +40,23 @@ table.dataTable.dtr-inline.collapsed>tbody>tr.parent>th.dtr-control:before, table.dataTable td.dt-control:before { background-color: var(--mc-dtr-active-bg) !important; } +/* The default initial order targets column 0, which is usually the non-orderable expand column */ +table.dataTable thead > tr > th.sorting_disabled.sorting_asc, +table.dataTable thead > tr > th.sorting_disabled.sorting_desc { + padding-right: 0.5rem; +} +table.dataTable thead > tr > th.sorting_disabled.sorting_asc:before, +table.dataTable thead > tr > th.sorting_disabled.sorting_asc:after, +table.dataTable thead > tr > th.sorting_disabled.sorting_desc:before, +table.dataTable thead > tr > th.sorting_disabled.sorting_desc:after { + display: none; +} table.dataTable.table-striped>tbody>tr>td { vertical-align: middle; } table.dataTable.table-striped>tbody>tr>td>input[type="checkbox"] { - margin-top: 7px; + /* centers the 1em checkbox in the 1.5em line, level with the expand control */ + margin-top: 0.25em; } td.dtr-col-lg { min-width: 350px; diff --git a/data/web/css/build/015-responsive.css b/data/web/css/build/015-responsive.css index 82be71069..d3e0263cd 100644 --- a/data/web/css/build/015-responsive.css +++ b/data/web/css/build/015-responsive.css @@ -191,7 +191,7 @@ height: 2rem; width: 2rem; line-height: 2rem; - margin-top: -15px; + margin-top: calc(-1rem - 1.5px); } li .dtr-data {