diff --git a/ts_web/elements/dees-table/styles.ts b/ts_web/elements/dees-table/styles.ts index 79c75ad..6b07c17 100644 --- a/ts_web/elements/dees-table/styles.ts +++ b/ts_web/elements/dees-table/styles.ts @@ -121,6 +121,20 @@ export const tableStyles: CSSResult[] = [ overflow-x: auto; /* prevent vertical scroll inside the table container */ overflow-y: hidden; + /* avoid reserving extra space for classic scrollbars where possible */ + scrollbar-gutter: stable both-edges; + } + /* Hide horizontal scrollbar entirely when not using sticky header */ + :host(:not([sticky-header])) .tableScroll { + -ms-overflow-style: none; /* IE/Edge */ + scrollbar-width: none; /* Firefox (hides both axes) */ + } + :host(:not([sticky-header])) .tableScroll::-webkit-scrollbar { + display: none; /* Chrome/Safari */ + } + /* In sticky-header mode, hide only the horizontal scrollbar in WebKit/Blink */ + :host([sticky-header]) .tableScroll::-webkit-scrollbar:horizontal { + height: 0px; } :host([sticky-header]) .tableScroll { max-height: var(--table-max-height, 360px);