MediaWiki:Vector-darkmode.less/wikitables.less

De RuneScape Wiki
Ir para: navegação, pesquisa
// <pre>
/* ========================
          wikitables
   ======================== */

table.wikitable {
	color: @dark-text;
    background: @dark-wikitable-background;

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

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

}

/* -----------------------
      table backgrounds
   ----------------------- */

.table-bg-color(@cell-background, @cell-text, @cell-link) {
    background: @cell-background;
    color: @cell-text;

    a:not(.mw-selflink) {
        color: @cell-link;
    }

}

.table-bg-red {
    .table-bg-color(@old-brick, @bridesmaid, @apricot-peach);
}

.table-bg-orange {
    .table-bg-color(@korma, @lace, @corvette);
}

.table-bg-yellow {
    .table-bg-color(@olive, @half-dutch, @golden);
}

.table-bg-green {
    .table-bg-color(@la-palma, @frost, @caper);
}

.table-bg-blue {
    .table-bg-color(@venice-blue, @tropical-blue, @jordy-blue);
}

.table-bg-purple {
    .table-bg-color(@seance, @heliotrope, @perfume);
}

.table-bg-pink {
    .table-bg-color(@cannon-pink, @french-lilac, @cherub);
}

.table-bg-gray,
.table-bg-grey {
    .table-bg-color(@shuttle-gray, @black-haze, @mystic);
}

// 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;

    // for [[MediaWiki:Gadget-highlightTable.js]]
    table.lighttable .highlight-over & {
        color: fade( @frost, 50% );
        background: darken( @la-palma, 4% );
    }

    table.lighttable .highlight-on & {
        color: fade( @frost, 40% );
        background: darken( @san-felix, 4% );
    }

}

/* -----------------------
           other
   ----------------------- */

// metadata on file pages
.mw_metadata {

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

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

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

}

// Bestiary and [[Summoning training]] temp fix
.rootpage-Bestiary,
.page-Summoning_training {

    #mw-content-text > div > table:nth-child(3) > tbody > tr > td:nth-child(2) > div > table th {
        color: #222;
    }

    #mw-content-text > div > dl:nth-child(5) > dd > table, .zebra {

        td {
            color: #222;
        }

        td a {
            color: saturate(darken(@steel-blue, 6%),8%);
        }

        td a.visited {
            color: lighten(spin(saturate(darken(@steel-blue, 6%), 8%), 15%), 5%);
        }

    }

}

/* -----------------------
        Table Sorters
   ----------------------- */
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");
}
table.jquery-tablesorter 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");
}
table.jquery-tablesorter 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");
}