Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a40c38944d212a7e

Jump to content

Template talk:Table cell templates

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
(Redirected from Template talk:Incorrect)
Latest comment: 2 hours ago by Hexware in topic Usage of Template:Shade on non-percentages

Proposed update to Template:n/a

[edit]

I'd like to update {{n/a}} to use to use ARIA (or some other method) to give information for a screen reader to say aloud. Example in the sandbox: Template:N/a/testcases The current ARIA label value is "Not applicable" but could be any reasonable default. Rjjiii (talk) 19:38, 20 December 2025 (UTC)Reply

@Rjjiii This has caused issues when used with articles such as List of Quantico episodes, see the usages of {{N/a}} inside the {{Series overview}}. The cells no longer display the em-dash, and "appear" as merged cells. This was not an issue before your changes; please fix these accordingly. -- Alex_21 TALK 01:04, 26 December 2025 (UTC)Reply
@Alex 21, thanks for bringing these up. I've tried an update to Module:Series overview that I think should work. The previous bug came from this template now containing the class "sr-only" which that module was applying to the whole cell. If that fix causes a different issue you can let me know and I'll self-revert that change and the change here, or you or another template editor are welcome to revert it. I previewed it on a range of different pages, and it seems to work. *knocks on wood* Rjjiii (talk) 04:04, 26 December 2025 (UTC)Reply
@Rjjiii Much appreciated. -- Alex_21 TALK 21:42, 26 December 2025 (UTC)Reply

Dark mode compatibility

[edit]

The colors used do not respect dark mode; see mw:Recommendations for night mode compatibility on Wikimedia wikis for advice. -- Beland (talk) 09:02, 4 January 2026 (UTC)Reply

There is some weird CSS interaction that is resulting in unreadable black-on-black link text on the UNCLOS row in List of treaties unsigned or unratified by the United States. This doesn't show up when I make a link in the {{not yet}} row in the table of template examples on Template:Table cell templates/doc. -- Beland (talk) 07:08, 28 March 2026 (UTC)Reply
Tables in Base64#Variants also have invisible links in dark mode. Indefatigable (talk) 15:18, 16 July 2026 (UTC)Reply
This piece of css is responsible for it:
html.skin-theme-clientpref-night body.ns-0:not(.page-Main_Page) .mw-parser-output table:not(.infobox):not(.navbox-inner):not(.navbox) [bgcolor] a:not(.mw-selflink),
html.skin-theme-clientpref-night body.ns-0:not(.page-Main_Page) .mw-parser-output table:not(.infobox):not(.navbox-inner):not(.navbox)[style*="background"]:not([style*="transparent"]):not([style*="inherit"]) a:not(.mw-selflink),
html.skin-theme-clientpref-night body.ns-0:not(.page-Main_Page) .mw-parser-output table:not(.infobox):not(.navbox-inner):not(.navbox) th[style*="background"]:not([style*="transparent"]):not([style*="inherit"]) a:not(.mw-selflink),
html.skin-theme-clientpref-night body.ns-0:not(.page-Main_Page) .mw-parser-output table:not(.infobox):not(.navbox-inner):not(.navbox) td[style*="background"]:not([style*="transparent"]):not([style*="inherit"]) a:not(.mw-selflink),
html.skin-theme-clientpref-night body.ns-0:not(.page-Main_Page) .mw-parser-output table:not(.infobox):not(.navbox-inner):not(.navbox) tr[style*="background"]:not([style*="transparent"]):not([style*="inherit"]) td a:not(.mw-selflink) {
  color:var(--color-base-fixed,#202122);
  text-decoration:underline
}
I don't understand where it lives, and according to @TheDJ's comment in https://phabricator.wikimedia.org/T360844#9957612 it seems to be a known issue for a while?
To fix the issue the hack probably could be tighten with
:not([style*="background-color: var"])
IamNikita (talk) 23:27, 17 July 2026 (UTC)Reply
Since the css already has this:
  .wikitable > tr > th,
  .wikitable > * > tr > th {
    background-color:var(--background-color-neutral,#eaecf0);
    color:var(--color-base,#202122);
    text-align:center
  }
I think simply removing background-color: var(--background-color-neutral,#eaecf0);color: var(--color-base,#202122) from the template code will fix everything in a preferred way. IamNikita (talk) 05:51, 18 July 2026 (UTC)Reply
Ah, no, the template doesn't convert td into th. But why? IamNikita (talk) 05:55, 18 July 2026 (UTC)Reply
Ok, I see, exclamation point ! instead of vertical bar | should be used to make cell table header. I'm not sure what is the purpose of Template:Rh then besides left-aligning the text, but then it feels like the default value for th in css is just wrong. IamNikita (talk) 06:11, 18 July 2026 (UTC)Reply
To leave thead th elements center-aligned and tbody th elements left-aligned the css can be changed like this:
  .wikitable > tr > th,
  .wikitable > * > tr > th {
    background-color:var(--background-color-neutral,#eaecf0);
    color:var(--color-base,#202122);
    text-align:left
  }
  .wikitable > thead > tr > th {
    text-align:center
  }
after which uses of |{{rh}} could be replaced with ! and there would be no need in Template:Rh anymore. IamNikita (talk) 22:53, 21 July 2026 (UTC)Reply
links are still invisible when using {{rh}}. image showing links broken with {{rh}}
compare after turning those two css rules off: image showing links fixed with {{rh}} but newly broken with other styling rokke (talk) 10:30, 22 August 2026 (UTC)Reply

Template-protected edit request on 9 March 2026

[edit]

Replace every instance of "E2B740" for the bronze colour code to "C96"

The current colour just doesn't look bronze — IмSтevan talk 19:33, 9 March 2026 (UTC)Reply

There are no contrast issues and it certainly looks more bronze. Due to the high visibility I want to wait a bit for potential objections before implementing the change however. Trialpears (talk) 22:49, 9 March 2026 (UTC)Reply
 Done Trialpears (talk) 12:07, 13 March 2026 (UTC)Reply
…Ah, so that is probably why third place [now] looks dark/muddy; compared to black-text-on-gold/black-text-on-silver, there is [now] less contrast.
Gold Silver Bronze "Bronze" Fourth
—Sladen (talk) 16:35, 12 July 2026 (UTC)Reply

classes aren't orthagonal

[edit]

Simple question:

Why are {{Lost}} and {{Eliminated}} classed as table-No?

{{Won}} is in class Yes2. Shouldn't {{Lost}} be in table-No2?

In fact, shouldn't Won be in table-success and Lost be in table-failure? ~2026-42129-64 (talk) 11:06, 1 September 2026 (UTC)Reply

Usage of Template:Shade on non-percentages

[edit]

This template is not usable with non-percentage numerical values because it assumes all values ({{{0}}} and {{{max}}}) are percentages. But the spec says color-mix requires percentages 0 through 100. Invalid values are a parse error. The solution would be for both {{{0}}} and {{{max}}} to be normalized by dividing by {{#expr: {{{max|100}}} / 100}}. -- Hexware (talk) 22:47, 23 September 2026 (UTC)Reply

Not sure what you mean; what is a non-percentage numerical value? Primefac (talk) 08:48, 24 September 2026 (UTC)Reply
Numbers used to show comparative growth but aren't percentages themselves. For example, PCI Express#Comparison table uses {{shade|xxx}} to show comparative speeds. And it broke once speeds broke 100 Gb/s. I was going to fix it with the {{{max}}} parameter set to 484, but then the whole table loses shading because of invalid CSS. --Hexware (talk) 16:38, 25 September 2026 (UTC)Reply