Skip to content

Commit f1c8637

Browse files
committed
[IMP] add sticky header class for long tables
closes #16541 X-original-commit: cc0413e Signed-off-by: Niki Brown (nikbr) <nikbr@odoo.com>
1 parent 87987ce commit f1c8637

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

extensions/odoo_theme/static/style.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,6 +954,24 @@ span.viewcode-link {
954954
margin-left: .3rem;
955955
}
956956

957+
// Table with sticky header (for long tables)
958+
// Offset top by header height so table header sticks below the site header
959+
.table-sticky-header {
960+
// override the display: block in the mobile override
961+
display: table!important;
962+
border-collapse: separate;
963+
border-spacing: 0;
964+
thead th {
965+
position: sticky;
966+
z-index: 2;
967+
background-color: $white;
968+
top: $o-headers-mobile-height;
969+
@include media-breakpoint-up(lg) {
970+
top: $o-headers-height;
971+
}
972+
}
973+
}
974+
957975
//------------------------------------------------------------------------------
958976
// Alerts
959977
//------------------------------------------------------------------------------

0 commit comments

Comments
 (0)