User:SuperHamster/mobile.css

/* Make table column+row headers sticky during overflow scroll.

Adapted from CSS by User:Jroberson108 on English Wikipedia https://en.wikipedia.org/wiki/User:Jroberson108/common.css CC BY-SA 3.0

/* Add vertical scroll for mobile (vh) so sticky column headers work. */ table.sticky-headers { max-height: 100vh; overflow: auto; }

/* Make column headers top-sticky. */ table.sticky-headers > * > tr > th[scope=col], table.sticky-headers > * > tr > th[scope=colgroup], table.sticky-headers > thead { position: -webkit-sticky; /* Safari */ position: sticky; top: -1px; z-index: 11; /* Above row headers */ }

/* Make target column headers left-sticky. */ table.sticky-headers > * > tr > th[scope=col].sticky-headers-col-left, table.sticky-headers > * > tr > th[scope=colgroup].sticky-headers-col-left { left: -1px; z-index: 12; /* Above other column headers */ }

/* Make row headers left-sticky. Last one sticky so no stack issues. */ table.sticky-headers > * > tr > th[scope=row]:last-of-type, table.sticky-headers > * > tr > th[scope=rowgroup]:last-of-type { position: -webkit-sticky; /* Safari */ position: sticky; left: -1px; z-index: 10; /* Above misc. content */ }