We have 'mw-datatable' class in MediaWiki core which was added on 2011. I think this code needs to be updated: colors, padding, etc.
https://phabricator.wikimedia.org/rMWf98a0ec075294df1bc7c9f70ca6a979137a26687
Something like that:
.mw-datatable { margin: 1em 0; border: 1px solid #a2a9b1; border-collapse: collapse; color: #000; } .mw-datatable > tr > th, .mw-datatable > tr > td, .mw-datatable > * > tr > th, .mw-datatable > * > tr > td { border: 1px solid #a2a9b1; padding: 0.2em 0.4em; } .mw-datatable tr:hover td { background-color: #eaf3ff; } .mw-datatable > tr > th, .mw-datatable > * > tr > th { background-color: #cfe3ff; text-align: center; } .mw-datatable > caption { font-weight: bold; }
Tests
https://ru.wikipedia.org/wiki/User:Iniquity/test2