MediaWiki:Vector-darkmode.less/wikitables.less

From Old School RuneScape Wiki
Jump to navigation Jump to search
// <pre>
/* ========================
          wikitables
   ======================== */

// Tables
.wikitable {
	background-color: @dark-wikitable-background;
	color: @dark-text;
	border-color: @dark-wikitable-border;

	// headers
	> tr > th,
	> * > tr > th {
		background-color: @dark-wikitable-header;
		border-color: @dark-wikitable-border;
	}

	// cells
	> tr > td,
	> * > tr > td {
		border-color: @dark-wikitable-border;
	}
}

// alternating colours (similar to spreadsheets)
table.alternating-rows tr:nth-child(odd),
table.alternating-cols td:nth-child(odd) {
    background: saturate( darken( @dark-wikitable-background, 3% ), 3% );
}

// Template:NA
.table-na {
	background: darken( @dark-wikitable-background, 3% );
	color: @waikawa-grey;
}

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

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

	th {
		background-color: @dark-wikitable-header;
	}

	td {
		background-color: @dark-wikitable-background;
	}
}

#mw-allmessagestable {
	.am_actual,
	.am_default {
		background-color: @dark-wikitable-background;
	}

	.am_default:hover,
	.am_actual:hover,
	tbody:hover td {
		background-color: @dark-wikitable-background-lighter;
	}
}


/* ========================
          infoboxes
   ======================== */

.infobox {
    background: @dark-infobox-background;
    border-color: @dark-infobox-border;

    .infobox-header {
        background: @dark-infobox-subheader;
        border-color: none;
        color: @dark-text;

        a {
            color: @dark-links;
        }
    }

    .infobox-subheader {
        background: @dark-infobox-subheader;
        border-color: @dark-infobox-background;
        color: @dark-text;

        &+.infobox-subheader {
            border-color: @dark-infobox-background;
        }

        // Examine text
        a {
            color: @dark-links;
        }
    }

    .infobox-nested + .infobox-nested {
        border-left-color: @dark-infobox-border;
    }

    th:not(.infobox-header):not(.infobox-subheader):not(.infobox-nested) {
        border-left: none;
        border-right-color: @dark-infobox-border;
    }
}

.infobox-bonuses {
    .infobox-bonuses-image {
        border-color: @dark-infobox-border;
    }
}

// Infobox Room door layout
.poh-room {
    background-color: @dark-infobox-background;
}

table.lighttable {
    .highlight-on {
        background-color: @san-felix;
        color: @frost;

        a {
            color: @caper;
        }
    }
    .highlight-over {
        background-color: @la-palma;
        color: @frost;

        a {
            color: @caper;
        }
    }

    // wikitables within lighttables should not automatically inherit green links if not highlighted itself;
    // applies to nested tables.
    table.wikitable tr:not(.highlight-over):not(.highlight-on) a {
    	color: @dark-links;
    }
}

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

table.mw-abuselog-details {
	background: @dark-wikitable-background;
	border-color: @dark-wikitable-border;

	th {
		background: @dark-wikitable-header;
	}

	th,
	td {
		border-color: @dark-wikitable-border;
	}
}

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

//Table sorter arrows
table.jquery-tablesorter {
	th.headerSort {
		background-image: linear-gradient(transparent, transparent), url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2221%22 height=%229%22 viewBox=%220 0 21 9%22%3E %3Cg fill=%22%23cbd9f4%22%3E %3Cpath d=%22M14.5 5l-4 4-4-4zM14.5 4l-4-4-4 4z%22/%3E %3C/g%3E %3C/svg%3E");
	}
	th.headerSortUp {
		background-image: linear-gradient(transparent, transparent), url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2221%22 height=%224%22 viewBox=%220 0 21 4%22%3E %3Cg fill=%22%23cbd9f4%22%3E %3Cpath d=%22M6.5 4l4-4 4 4z%22/%3E %3C/g%3E %3C/svg%3E");
	}
	th.headerSortDown {
		background-image: linear-gradient(transparent, transparent), url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2221%22 height=%224%22 viewBox=%220 0 21 4%22%3E %3Cg fill=%22%23cbd9f4%22%3E %3Cpath d=%22M14.5 0l-4 4-4-4z%22/%3E %3C/g%3E %3C/svg%3E");
	}
}