User:Timeshifter/Sandbox152

See discussion: Template talk:Static row numbers


 * See: : class=mw-datatable should not override the inline background colors set for specific table rows.
 * See: : Community expectation that mw-datatable styles are loaded on pages which use it

Background colors set for rows
This table excerpt is from the "Top scorers" section of this version of Denmark men's national handball team. It is common in many sport statistics tables to add a background color to some of the rows. In this table excerpt {{legend|#CFECEC|still active national team players are highlighted|border=#AAAAAA}}

I want to be able to add class=mw-datatable to such tables, but not lose those background colors.

Without class=mw-datatable
Return to top.

{| class="wikitable sortable static-row-numbers" border=1 style=text-align:center

With class=mw-datatable
Return to top.

{| class="wikitable sortable static-row-numbers mw-datatable" border=1 style=text-align:center

Background colors set for individual cells
Return to top.

This is for testing.

{| class="wikitable sortable static-row-numbers" border=1 style=text-align:center

Template sets colors for individual cells
Return to top.

This is for testing.

This is adapted from List of countries by intentional homicide rate. See template: ccolor

{| class="wikitable sortable static-row-numbers sort-under" border=1 style=text-align:right