MediaWiki:Common.less/table-colours.less

From Blaseball Wiki

//

/* ========================
          wikitables
   ======================== */
   
:root {
	--pi-background: @wikitable-header;
	--pi-secondary-background: @wikitable-background;
    --pi-border-color: @body-highlight;
}

// Tables
.mw-datatable th,
#mw-content-text table.wikitable > tr > th,
#mw-content-text table.wikitable > * > tr > th {
    background-color: @wikitable-header;
}

.mw-datatable td,
#mw-content-text table.wikitable > tr > th,
#mw-content-text table.wikitable > tr > td,
#mw-content-text table.wikitable > * > tr > th,
#mw-content-text table.wikitable > * > tr > td {
    border: 1px solid @wikitable-border;
}

.mw-datatable td,
table.wikitable, table.mw-datatable {
    border: transparent;
    background: @wikitable-background;
}

// Data-table hover
#mw-allmessagestable tbody:hover td,
.mw-datatable tr:hover td {
    background-color: @wikitable-background-lighter;
}

// Text & Links
#mw-content-text table.wikitable {
    color: @text;
}

// alternating colours (similar to spreadsheets)
table.alternating-rows tr:nth-child(even),
table.alternating-cols td:nth-child(even),
table.cargoTable.noMerge tr:nth-child(even) {
    background: desaturate( lighten( @wikitable-background, 3% ), 3% );
}

table.alternating-rows tr:nth-child(odd),
table.alternating-cols td:nth-child(odd),
table.cargoTable.noMerge tr:nth-child(odd) {
    background: saturate( darken( @wikitable-background, 3% ), 3% );
}

// Template:Yes and Template:Yes2
.table-yes {
    color: #9f9;
}

.table-yes-inverted {
    color: @black;
    background-color: #9f9;
}

// Metadata tables, allmessages, etc
.mw_metadata td,
.mw_metadata th {
    border-color: @wikitable-border;
}

.mw_metadata th {
    background-color: @wikitable-header;
}

.mw_metadata td,
#mw-allmessagestable .am_actual,
#mw-allmessagestable .allmessages-customised .am_default {
    background-color: @wikitable-background;
}

#mw-allmessagestable .allmessages-customised:hover .am_default,
#mw-allmessagestable .am_actual:hover,
#mw-allmessagestable .allmessages-customised:hover + .allmessages-customised .am_actual {
    background-color: @wikitable-background-lighter;
}

table.wikitable > tr > th, table.wikitable > * > tr > th {
    background-color: @wikitable-header;
}
table.wikitable {
    color: @text;
    background:@wikitable-background;
}
table.wikitable > tr > th,
table.wikitable > tr > td,
table.wikitable > * > tr > th,
table.wikitable > * > tr > td {
    border: 1px solid @border;
}

// AbuseFilter and AbuseLog tables and text
tr.mw-abusefilter-list-disabled,
tr.mw-abusefilter-list-disabled td {
    color: @text;
}

table.mw-abuselog-details th {
    background: @wikitable-header;
}

table.mw-abuselog-details th,
table.mw-abuselog-details td {
    border: 1px solid @border;
}

.mw-abuselog-var-value,
td.mw-abuselog-var {
    background-color: @wikitable-background;
}

//Infobox dropdown
select#infobox-select-0 {
    background: @wikitable-background;
    color: @text;
    border-color: @border;
    border-block-end-color: @border;
    border-block-start-color: @border;
}

// Infobox
.portable-infobox {
    border: 2px solid @wikitable-background;
    
    .pi-group {
        border: none;
    }
}

// Decree tables
@winner-border: 2px dashed;
#mw-content-text table.wikitable tr.winner td {
  background-color: @wikitable-accent;
  border-top: @winner-border;
  border-bottom: @winner-border;

  &:first-child {
    border-left: @winner-border;
  }

  &:last-child {
    border-right: @winner-border;
  }
}