From 15b3e1f5cf6027b10ae061cc427136935851f2cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Thu, 12 Dec 2024 10:50:15 +0100 Subject: [PATCH] Use the position:sticky on the row of the thead It was previously put on the th because neither Firefox nor Chrome supported it on thead or tr but it has been solved now. https://caniuse.com/css-sticky --- sao/src/sao.less | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/sao/src/sao.less b/sao/src/sao.less index 842ab067d4..71286d226d 100644 --- a/sao/src/sao.less +++ b/sao/src/sao.less @@ -769,23 +769,29 @@ img.icon { text-align: end; } } - > thead > tr:first-child th { - background-color: @body-bg; + > thead > tr:first-child { position: sticky; top: 0; z-index: 100; + + th { + background-color: @body-bg; + } } - > tfoot > tr th { - background-color: @body-bg; + > tfoot > tr { bottom: 0; position: sticky; z-index: 100; - & > label { - display: none; - } - & > div.value { - .user-select(text); - white-space: pre; + + th { + background-color: @body-bg; + & > label { + display: none; + } + & > div.value { + .user-select(text); + white-space: pre; + } } } > tbody > tr > td { @@ -1394,7 +1400,7 @@ input.column-boolean { min-width: unset !important; /* Hide table headers (but not display: none; for accessiblity) */ > thead > tr { - position: absolute; + position: absolute !important; top: -9999px; left: -9999px; }