table.static-row-numbers {
  counter-reset: rowNumber;
}

table.static-row-numbers tr::before {
  content: "";
  display: table-cell;
  padding-right: 0.5em;
  text-align: right;
}

table.static-row-numbers.sortable tbody tr:not(.static-row-header):not(.static-row-numbers-norank)::before,
table.static-row-numbers.mw-sticky-header tbody tr:not(.static-row-header):not(.static-row-numbers-norank)::before,
table.static-row-numbers:not(.sortable) tbody tr:not(:first-child):not(.static-row-header):not(.static-row-numbers-norank)::before {
  counter-increment: rowNumber;
  content: counter(rowNumber);
  padding-right: 0.5em;
  padding-left: 0.5em;
  vertical-align: inherit;
}

.static-row-header-text thead tr:first-of-type::before,
.static-row-header-text:not(.sortable) tbody tr:first-of-type::before {
  content: "No.";
  padding-right: 0.5em;
  padding-left: 0.5em;
  font-weight: bold;
}

.static-row-header-hash thead tr:first-of-type::before,
.static-row-header-hash:not(.sortable) tbody tr:first-of-type::before {
  content: "#";
  padding-right: 0.5em;
  padding-left: 0.5em;
  font-weight: bold;
}

.static-row-numbers.wikitable tr::before {
  background-color: #eaecf0;
  vertical-align: middle;
}

body:not(.skin-minerva) .static-row-numbers.mw-datatable:not(.wikitable) tr::before {
  background-color: #eaeeff;
}

table.static-row-numbers.wikitable tbody tr:not(.static-row-header)::before,
body:not(.skin-minerva) .static-row-numbers.mw-datatable:not(.wikitable) tbody tr::before {
  border: 1px solid #a2a9b1;
}

.srn-white-background {
  background: #fff;
}

.static-row-numbers tr:hover {
  background: #eaf3ff;
}