From d491c1901f0a0720ace8ad7976cb1563fc3af65f Mon Sep 17 00:00:00 2001 From: Fabian Schieder Date: Sat, 28 Feb 2026 22:05:18 +0100 Subject: [PATCH] Add responsive table scrolling and enhance scrollbar styles for better usability --- adminer/adminer.css | 20 +++++++++++++++++++- adminer/index.php | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/adminer/adminer.css b/adminer/adminer.css index eefe1ad..e625616 100644 --- a/adminer/adminer.css +++ b/adminer/adminer.css @@ -357,8 +357,26 @@ input[type=number]::-webkit-outer-spin-button { } /* ── TABLE ────────────────────────────────────── */ +.table-scroll { + width:100%; + max-width:100%; + overflow-x:auto; + overflow-y:hidden; + -webkit-overflow-scrolling:touch; + border-radius:12px; +} + +/* dezente Scrollbar (Chromium/Edge) */ +.table-scroll::-webkit-scrollbar { height:10px; } +.table-scroll::-webkit-scrollbar-track { background:rgba(255,255,255,.03); border-radius:999px; } +.table-scroll::-webkit-scrollbar-thumb { background:rgba(255,255,255,.12); border-radius:999px; } +.table-scroll::-webkit-scrollbar-thumb:hover { background:rgba(99,102,241,.25); } + .db-table { - width:100%; border-collapse:collapse; font-size:.85rem; + width:100%; + min-width:max-content; + border-collapse:collapse; + font-size:.85rem; overflow:hidden; } .db-table thead th { diff --git a/adminer/index.php b/adminer/index.php index f398c9a..e645e38 100644 --- a/adminer/index.php +++ b/adminer/index.php @@ -494,7 +494,7 @@ function admin_render_table(array $rows, string $table = '', ?string $pkCol = nu $cols = array_keys((array)$rows[0]); $hasActions = ($table !== '' && $pkCol !== null && in_array($pkCol, $cols, true)); - $html = '
'; + $html = '
'; foreach ($cols as $c) $html .= ''; if ($hasActions) $html .= '';
' . h((string)$c) . 'Aktionen