الگو:Static row numbers/styles.css: تفاوت میان نسخهها
پرش به ناوبری
پرش به جستجو
بدون خلاصۀ ویرایش |
بدون خلاصۀ ویرایش برچسب: برگرداندهشده |
||
خط ۱: | خط ۱: | ||
/* {{pp-template}} | /* {{pp-template}} */ | ||
.static-row-numbers { | .static-row-numbers { | ||
counter-reset: rowNumber; | counter-reset: rowNumber; |
نسخهٔ ۲۴ مهٔ ۲۰۲۴، ساعت ۰۲:۱۷
/* {{pp-template}} */
.static-row-numbers {
counter-reset: rowNumber;
}
.static-row-numbers tr::before {
content: "";
display: table-cell;
padding-right: 0.5em;
padding-left: 0.5em;
text-align: right;
vertical-align: inherit;
}
.static-row-numbers.wikitable tr::before {
background-color: #eaecf0;
}
/**
* Add count to all tbody rows except for two classes. If no thead, skip the
* first tbody row which may not have one of the two classes:
*/
.static-row-numbers thead + tbody tr:first-child:not(.static-row-header):not(.static-row-numbers-norank)::before,
.static-row-numbers tbody tr:not(:first-child):not(.static-row-header):not(.static-row-numbers-norank)::before {
counter-increment: rowNumber;
content: counter(rowNumber);
}
/**
* Add column label to first row in thead or, if no thead, in tbody:
*/
.static-row-header-text.static-row-numbers thead tr:first-child::before,
.static-row-header-text.static-row-numbers caption + tbody tr:first-child::before,
.static-row-header-text.static-row-numbers tbody:first-child tr:first-child::before {
content: "No.";
font-weight: bold;
}
.static-row-header-hash.static-row-numbers thead tr:first-child::before,
.static-row-header-hash.static-row-numbers caption + tbody tr:first-child::before,
.static-row-header-hash.static-row-numbers tbody:first-child tr:first-child::before {
content: "#";
font-weight: bold;
}
/**
* Add borders in numbers column.
*
* Windows Firefox tr::before doesn't inherit color, so hard set.
* Plain table borders on Timeless {{row hover highlight}} mw-datatable.
*/
/* Wikitable. */
.static-row-numbers.wikitable tr::before {
border: 0 solid #a2a9b1;
}
.static-row-numbers.wikitable thead + tbody tr:first-child:not(.static-row-header)::before,
.static-row-numbers.wikitable tbody tr:not(:first-child):not(.static-row-header)::before {
border-width: 1px;
}
body.skin-monobook .static-row-numbers.wikitable tr::before {
border-color: #aaaaaa;
}
body.skin-timeless .static-row-numbers.wikitable tr::before {
border-color: #c8ccd1;
}
body.skin-minerva .static-row-numbers.wikitable tr::before {
border-color: rgba(84,89,93,.3);
}
/* Plain with border. */
table[border].static-row-numbers:not(.wikitable) tr::before {
border: 0 inset #202122;
}
table[border].static-row-numbers:not(.wikitable) thead + tbody tr:first-child:not(.static-row-header)::before,
table[border].static-row-numbers:not(.wikitable) tbody tr:not(:first-child):not(.static-row-header)::before {
border-width: 1px;
}
body.skin-monobook table[border].static-row-numbers:not(.wikitable) tr::before,
body.skin-timeless table[border].static-row-numbers:not(.wikitable):not(.mw-datatable) tr::before {
border-color: #000000;
}
/* Plain with optional border + .mw-datatable. */
body.skin-timeless .static-row-numbers.mw-datatable:not(.wikitable) tr::before {
border: 0 solid #c8ccd1;
}
body.skin-timeless .static-row-numbers.mw-datatable:not(.wikitable) thead + tbody tr:first-child:not(.static-row-header)::before,
body.skin-timeless .static-row-numbers.mw-datatable:not(.wikitable) tbody tr:not(:first-child):not(.static-row-header)::before {
border-width: 1px;
}
/* Minerva mobile. */
@media all and (max-width: 720px) {
/* Wikitable. */
body.skin-minerva .static-row-numbers.wikitable tr::before {
border-left-width: 1px;
}
body.skin-minerva .static-row-numbers.wikitable thead tr:first-child::before,
body.skin-minerva .static-row-numbers.wikitable caption + tbody tr:first-child::before,
body.skin-minerva .static-row-numbers.wikitable tbody:first-child tr:first-child::before {
border-top-width: 1px;
}
body.skin-minerva .static-row-numbers.wikitable tbody tr:last-child::before,
body.skin-minerva .static-row-numbers.wikitable tfoot tr:last-child::before {
border-bottom-width: 1px;
}
}