MediaWiki:Common.less/wikitables.less

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

@wikitable-background: @white;
@wikitable-header-background: @gallery;

table.wikitable {
    background: @wikitable-background;
    font-size: .9em;
    box-shadow: @box-shadow;

    // headers
    > * > tr > th {
        background: @wikitable-header-background;
        border-color: darken( @wikitable-header-background, 7% );
    }

    // cells
    > * > tr > td {
        border-color: darken( @wikitable-background, 10% );
        padding: .25em .45em;
    }

	// i forget what this is for
    .header-top {
        background: #448fba;
    }

}

/* --------------------------
      column and row stuff
   -------------------------- */

/* nth td from the left is right-aligned - ths are ignored */
table.align-right-1 td:nth-of-type(1),
table.align-right-2 td:nth-of-type(2),
table.align-right-3 td:nth-of-type(3),
table.align-right-4 td:nth-of-type(4),
table.align-right-5 td:nth-of-type(5),
table.align-right-6 td:nth-of-type(6),
table.align-right-7 td:nth-of-type(7),
table.align-right-8 td:nth-of-type(8),
table.align-right-9 td:nth-of-type(9),
table.align-right-10 td:nth-of-type(10) {
    text-align: right;
}

/* center */
table.align-center-1 td:nth-of-type(1),
table.align-center-2 td:nth-of-type(2),
table.align-center-3 td:nth-of-type(3),
table.align-center-4 td:nth-of-type(4),
table.align-center-5 td:nth-of-type(5),
table.align-center-6 td:nth-of-type(6),
table.align-center-7 td:nth-of-type(7),
table.align-center-8 td:nth-of-type(8),
table.align-center-9 td:nth-of-type(9),
table.align-center-10 td:nth-of-type(10) {
    text-align: center;
}

/* left */
table.align-left-1 td:nth-of-type(1),
table.align-left-2 td:nth-of-type(2),
table.align-left-3 td:nth-of-type(3),
table.align-left-4 td:nth-of-type(4),
table.align-left-5 td:nth-of-type(5),
table.align-left-6 td:nth-of-type(6),
table.align-left-7 td:nth-of-type(7),
table.align-left-8 td:nth-of-type(8),
table.align-left-9 td:nth-of-type(9),
table.align-left-10 td:nth-of-type(10) {
    text-align: left;
}

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

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

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

    a {
        color: @cell-link;
        text-decoration: underline;
    }

}

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

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

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

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

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

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

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

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

/* [[Template:NA]] */
.table-na {
    background: @alabaster;
    color: #aaa;
    vertical-align: middle;
    text-align: center;
    cursor: default;
    .user-select( none );

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

    table.lighttable .highlight-on & {
        color: fade( @la-palma, 55% );
        background: darken( @caper, 5% );
    }

}