diff --git a/src/resources/formats/dashboard/quarto-dashboard.js b/src/resources/formats/dashboard/quarto-dashboard.js index b1e7c95def..b24b74a08f 100644 --- a/src/resources/formats/dashboard/quarto-dashboard.js +++ b/src/resources/formats/dashboard/quarto-dashboard.js @@ -51,6 +51,7 @@ function refreshStickyHeaders() { const iTable = cellOutputNode.querySelector(".itables table"); if (iTable) { stickyThead.apply([iTable], { scrollableArea: cellOutputNode }); + cellOutputNode.classList.add("dashboard-data-table"); } } } diff --git a/src/resources/formats/dashboard/quarto-dashboard.scss b/src/resources/formats/dashboard/quarto-dashboard.scss index c18610c271..e11eca17b4 100644 --- a/src/resources/formats/dashboard/quarto-dashboard.scss +++ b/src/resources/formats/dashboard/quarto-dashboard.scss @@ -1009,5 +1009,10 @@ $valuebox-colors: ( /*-- itables --*/ .tableFloatingHeaderOriginal { background-color: $card-bg; - transform: translateY(-1px); + position: sticky !important; + top: 0 !important; +} + +.dashboard-data-table { + margin-top: -1px; }