Please see Help:Table section on class=mw-datatable:
*https://en.wikipedia.org/w/index.php?title=Help:Table&oldid=1027899366#mw-datatable_%E2%80%93_row_highlighting_via_cursor_hover._White_background
*https://en.wikipedia.org/wiki/Help:Table#mw-datatable_%E2%80%93_row_highlighting_via_cursor_hover._White_background
See the note there:
Note: class=mw-datatable overrides the background color for a row, but not the background color for individual cells.==Tables with background colors set per row==
It is a problem on many sport statistic tables that use a lot of inline background row colors.I want to be able to add **//class=mw-datatable//** to tables, For example;and **not lose the background colors set for rows. on these tables:
***
Please see **[[https://en.wikipedia.org/w/index.php?title=Denmark_men%27s_national_handball_team&oldid=1027808566#Statistics
*iki/User:Timeshifter/Sandbox152 | User:Timeshifter/Sandbox152]].** The table excerpt there is from the "Top scorers" section of **[[https://en.wikipedia.org/w/index.php?title=Iceland_men%27s_national_handball_team&oldid=1027809615#Individual_all-time_records
I was updating the row numbers formatting on those pages for those side-by-side tables. They seem to like side-by-side tables. I do too now that they wrap on narrower screensDenmark_men%27s_national_handball_team&oldid=1028061591#Top_scorers | this version]]** of **[[https://en.wikipedia.org/wiki/Denmark_men%27s_national_handball_team#Top_scorers | Denmark men's national handball team]]**. But I can't use class=mw-datatable on those particularIt is common in many sport statistics tables because theto add a background color is set byto some of the row,s. not cell.
class=mw-datatable (combined with class=wikitable) is used more and more since its white background color is preferred by many for statistic tables over the light gray background of class=wikitable used alone. But if class=mw-datatable is used on those tables I linked to,In this table excerpt the **rows** for **still active national team players** are **highlighted.**
The first table in the sandbox is **//without// class=mw-datatable.** The second table is **//with// class=mw-datatable. the whole table goes to a white background color** You can see how the class removes the background colors for rows and substitutes the white background color of the rest of the table data cells.
So is there a way to adjust class=mw-datat==Table so that the inlines with background colors set for a row has importance or precedence?per data cell==
class=mw-datatable respects the inline background color when that **color is set per data cell.** For example; on the many tables that use a color gradient template on a per cell basis. For example; see the rate column here:
*in the main table in **[[https://en.wikipedia.org/w/index.php?title=List_of_countries_by_intentional_homicide_rate&oldid=1026393424#By_country,_region,_or_dependent_territory | this version]]** of **[[https://en.wikipedia.org/wiki/List_of_countries_by_intentional_homicide_rate#By_country,_region,_or_dependent_territory
| List of countries by intentional homicide rate]].** That main table uses **class="mw-datatable wikitable"** and it is not a problem. The background colors set per cell remain.
So I would like that also for inline background color set for a row.==Why it is important==
Also,class=mw-datatable (usually combined with class=wikitable) is used more and more. It produces a white background color that is preferred by many for statistic tables. Due to the better contrast and readability for many people. Versus the light gray background color of class=wikitable used alone. if this is fixed,Plus class=mw-datatable will highlight the row that the cursor hovers over. then this row numbers auxiliary template Making it easier to scan be used on many more tablesacross that row, especially sport statistic tables:
*https://en.wikipedia.org/wiki/Template:Static_row_if it is a long row.
Also, if this is fixed, then this row numbers_table - it auxiliary template can be uses class=mw-datad on more table.s, Template:Static_row_numbers_table is used with:
*especially sport statistic tables: **[[https://en.wikipedia.org/wiki/Template:Static_row_numbers_table | Template:Static row numbers table]].** It uses **class="mw-datatable wikitable".** This template is used with: **[[https://en.wikipedia.org/wiki/Template:Static_row_numbers | Template:Static row numbers]].** The 2 templates together make setting up row numbers on a table very fast.