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: a42ebde7dc62ea0a

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:Exempt)
Latest comment: 2 days ago by LetmeEditit in topic "table-IUCN" templates (Template:IUCN-LC etc)

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

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
Should be sorted now, swapped to just using {{%}}. Primefac (talk) 20:48, 26 September 2026 (UTC)Reply

"table-IUCN" templates (Template:IUCN-LC etc)

[edit]

Is it ok if I merge these into one template? I would also like to change the colour scheme to match {{IUCN status}}. Thanks Let Me Edit It (talk) 16:05, 27 September 2026 (UTC)Reply

Makes sense, easier to have something like {{IUCN-des|XX}} (where XX is the designation) than a different templates for each. Going to have to think of a short/good name though since IUCN is already a redirect to {{cite IUCN}}. Primefac (talk) 17:29, 27 September 2026 (UTC)Reply
How about {{IUCN cell}}? Let Me Edit It (talk) 17:31, 27 September 2026 (UTC)Reply
Go for it. Primefac (talk) 17:32, 27 September 2026 (UTC)Reply
 Done. Will add the links when I get around to it. I think for TemplateData etc, it might be better for it to have its own doc page. Let Me Edit It (talk) 18:04, 27 September 2026 (UTC)Reply