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

Jump to content

Template talk:Infobox

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
(Redirected from Module talk:Infobox/styles.css)
Latest comment: 11 days ago by Anomie in topic Edit request 10 July 2026

Auto implement Template:longitem

[edit]

I have recently been adding {{longitem}} to numerous Infoboxes (example) to better wrap long items in labels. It has occurred to me, shouldn't this be automatic? Is there any situation where you would not want better wrap labels that take up 2 lines? It would seem to me that it would be a much better solution to automatically do this at the level of {{Infobox}}/Module:Infobox rather then having to individually wrap any infobox label that has the potential to wrap to a second line.

If there is an objection to automatically implementing this on every infobox, could we implement it but hide it behind a flag like |auto_longitem= (to mimic the way |autoheaders= is used)?

Boils down to 2 questions:

  1. Is there any objection to adding such a feature?
  2. How technically feasible is it to achieve?

Pinging users who have done major work on this module: @Izno, Fayenatic london, Pppery, Plastikspork, Frietjes, Gonnym, and Primefac: Zackmann (Talk to me/What I been doing) 17:50, 9 May 2026 (UTC)Reply

I don't see a need for something needed so irregularly in a generic template. Izno (talk) 18:47, 9 May 2026 (UTC)Reply
@Izno: can you say more? Needed so irregularly? It seems to be used quite a lot so not sure I understand your meaning? Zackmann (Talk to me/What I been doing) 18:58, 9 May 2026 (UTC)Reply
You've added it to a dozen templates in the past month and a half but only to a handful of parameters each. It doesn't need to be supported at that level of use. Izno (talk) 19:03, 9 May 2026 (UTC)Reply
I guess my point is rather than having to add it one by one, wouldn't it be easier to just have it automatically implemented? I'm genuinely asking as I don't have enough of an understanding of the Module to know, is there a downside to automatically wrapping long labels with less padding that would make this a bad idea to do? I agree I've only added it to a few templates recently, but wouldn't it be better to not have to search for these cases and manually add it and instead have it automatically done. What am I missing? Zackmann (Talk to me/What I been doing) 21:06, 9 May 2026 (UTC)Reply
So I was able to pretty quickly and easily achieve this with this edit to Module:Infobox/styles.css. Please someone let me know (or simply revert it) if there is any issue with this that I am overlooking. Zackmann (Talk to me/What I been doing) 23:06, 9 May 2026 (UTC)Reply
Ugh so it caused an issue with Template:Infobox soap character. Open to ideas... Zackmann (Talk to me/What I been doing) 02:25, 10 May 2026 (UTC)Reply
@Zackmann08 Never ever make test edits to a module so widely transcluded. Please don't do that again. Izno (talk) 15:53, 10 May 2026 (UTC)Reply
To be fair, I tested the edits repeatedly... My edit summary doesn't accurately portray that and I will be sure to better summarize in the future. This was quite extensively tested. An unforeseen very minor issue cropped up and I immediately reverted my edit, but this was a minor style issue. It is not like I blanked data or broke templates. Your warning is noted, but I feel overly dramatic. Zackmann (Talk to me/What I been doing) 15:56, 10 May 2026 (UTC)Reply
I could have told you, if that was what you intended to implement, that it would cause issues. It is not a minor issue. I could have told you that your change would break how the template works if you had proposed the actual change on the talk page using a sandbox (and would probably also affect mobile poorly, based on the specific change). Do better.
An immediate revert is insufficient; you're still dropping 3 million pages into the job queue. Izno (talk) 16:00, 10 May 2026 (UTC)Reply
Making that change is also incompatible with where the template will eventually go (see User:Izno/Sandbox/Infobox).
If you want to handle long items, you will need to continue implementing them ad hoc. Izno (talk) 16:01, 10 May 2026 (UTC)Reply
@Izno: that is duly noted. I felt I tried to solicit your input and you were pretty dismissive of the idea as a whole. In the future I will be more careful and I do apologize. I admit I completely neglected to realize that I was dropping 3 million pages into the job queue. Clearly I still have lots to learn. Rest assured I hear you loud and clear and I will do better moving forward. I had planned to continue with this idea at Module:Infobox/styles.css/sandbox and to request a review and leave it to someone else to actually implement in the live version of the code. Based on the wholly negative reaction I guess it is best to just walk away and focus on other projects. Zackmann (Talk to me/What I been doing) 16:06, 10 May 2026 (UTC)Reply
Thanks for the ping, but this is beyond my skill set. I merely updated some category names. – Fayenatic London 14:34, 10 May 2026 (UTC)Reply

Dark Mode

[edit]

I'm confused. Why exactly is Infobox styling completely hidden in dark mode while other CSS isn't? --DollarStoreBa'alConverse 22:44, 9 May 2026 (UTC)Reply

Blank rows on child infoboxes....

[edit]

There was previously a discussion here about blank rows on child infoboxes. Looks like the thread went stale and was never addressed. To recap and restate what Prefall said in the initial post which arose because of an issue with {{Infobox social media personality}}

the blank rows are related to embedding using |child=yes. Almost all of the testcases have a blank line or two, on both desktop and mobile, with this markup:

<tr><td colspan="2" class="infobox-full-data"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1316064257"></td></tr>

One blank line is always created at the beginning of this wrapper template (in-between {{Infobox person}}'s rows and the custom rows for this infobox), and a second is created when embedding this template into another. Both are direct results of |child=yes, which creates a blank row where |title= would be listed. It simply does not suppress this row if the title is left blank. The blank row does NOT occur if you embed using |subbox=yes instead. This issue is actually already mentioned at Template:Infobox#Embedding. A workaround/solution is listed but it would have to be applied everywhere that |child=yes is used. This is something that should be fixed directly at Module:Infobox instead.

I am seeing this in many, many places and wondering if someone with more experience that I can help trace this down. --Zackmann (Talk to me/What I been doing) 23:23, 1 June 2026 (UTC)Reply

I have added a very simplistic testcase here to show the issue. Zackmann (Talk to me/What I been doing) 23:38, 1 June 2026 (UTC)Reply
@Izno: is this something you can provide any guidance on? I'm certainly not going to push any changes live without a review but after my experience above I'm a bit wary here... Zackmann (Talk to me/What I been doing) 03:55, 2 June 2026 (UTC)Reply
@Frietjes: any ideas here? Even a nudge in the right direction would be appreciated... Spent some time playing with it but got nowhere. Zackmann (Talk to me/What I been doing) 23:31, 2 June 2026 (UTC)Reply
Special:Diff/1327161879/1357499550, maybe? Anomie 00:25, 3 June 2026 (UTC)Reply
And the gold star goes to Anomie!!! That definitely seems to solve the issue I was seeing. @Prefall: can you confirm? Zackmann (Talk to me/What I been doing) 00:28, 3 June 2026 (UTC)Reply
I just tried some local tests and it worked on all of the nesting combinations I could think of. Amazing work, @Anomie: thanks! This has been bugging me for so long. Prefall 01:34, 3 June 2026 (UTC)Reply
Having scrolled through the Infobox/testcases, I am not seeing any issues that this has caused. @Anomie: are you comfortable merging? Zackmann (Talk to me/What I been doing) 05:04, 3 June 2026 (UTC)Reply
This should be merged as a templatestyles adjustment with a class. Izno (talk) 06:49, 3 June 2026 (UTC)Reply
It seems Izno has ideas for doing it differently, so I'll hold off pending that proposal. Anomie 11:29, 3 June 2026 (UTC)Reply
@Izno: can you clarify what the issue is with the way Anomie has solved this long standing issue or implement your proposed solution? Zackmann (Talk to me/What I been doing) 17:54, 3 June 2026 (UTC)Reply
It's just a minor change , with the appropriate add in the styles sheet.
Beginning to wonder whether the right approach should be to move TemplateStyles totally outside the infobox instead of the shiftery that goes on at Module:Infobox#L-61. See e.g. hiding_templatestyles in Module:Navbox for something similar.
As I said earlier this should be a non-issue at some point in the future, right now it's all happening because we're hacking around the infobox being a table. Izno (talk) 20:46, 3 June 2026 (UTC)Reply
Awesome thanks for making this happen. Hopefully this does become a non-issue in the future! Zackmann (Talk to me/What I been doing) 20:59, 3 June 2026 (UTC)Reply
@Izno: is it safe to add the appropriate code to Module:Infobox/styles.css or should I create Module:Infobox/styles.css/sandbox to properly test this? Zackmann (Talk to me/What I been doing) 05:27, 7 June 2026 (UTC)Reply
Module:Infobox/sandbox/styles.css is where it would exist if you wanted to check it for yourself. I just assumed that Anomie would revisit. :^) Izno (talk) 05:42, 7 June 2026 (UTC)Reply
I wasn't sure where the sandbox went in that title. Thank you. @Anomie: do you want to implement this new solution or shall I? Zackmann (Talk to me/What I been doing) 16:15, 7 June 2026 (UTC)Reply
You can go for it if you want. I'm a bit busy at the moment. Anomie 17:25, 7 June 2026 (UTC)Reply
After testing, this solution appears to be working. @Izno: can you you please review Module:Infobox/sandbox/styles.css and Module:Infobox/sandbox and confirm you aren't seeing something I'm missing? Having checked all the test cases, I see nothing broken and the identified issue resolved. Zackmann (Talk to me/What I been doing) 18:15, 7 June 2026 (UTC)Reply
If you want to, go for it. Just make sure to target the right styles page from the main module when you copy it over. Izno (talk) 22:28, 7 June 2026 (UTC)Reply
 Done Good reminder! Thank you. Zackmann (Talk to me/What I been doing) 01:00, 8 June 2026 (UTC)Reply
@Zackmann08: I noticed this fix has now been deployed across infoboxes, and it's working on desktop view, but not on mobile view. I specifically tested mobile view when I left my previous comment, and it was working then. The class with "display: none" seems to be getting overwritten on mobile by another CSS rule with "display: flex". Not sure if this is the best way to solve this, but adding "!important" to the hidden class worked for me locally. Prefall 20:11, 9 June 2026 (UTC)Reply
Rather than !important, it might make more sense to add a selector for body.skin--responsive.skin-minerva .infobox > tbody > tr.infobox-hiddenrow to override the problematic rule from the Minerva skin. Anomie 21:40, 9 June 2026 (UTC)Reply
Knowing very little about the different skins or the differences in views between mobile and desktop, I'm going to abstain here... Happy to help if I can but this is a bit over my head. Zackmann (Talk to me/What I been doing) 21:42, 9 June 2026 (UTC)Reply
Yeah, sorted. I am annoyed by the upstream specificity. Izno (talk) 21:51, 9 June 2026 (UTC)Reply
Infobox historic site
Site notes
Architectural style
architecture
Infobox NRHP

@Anomie: and all, I'm also still seeing an issue here on desktop actually... Found on Jere Shine site by reproduced at right. Hust about the call to {{Infobox NRHP}} there is still an extra row being shown. --Zackmann (Talk to me/What I been doing) 00:49, 10 June 2026 (UTC)Reply

Looks like {{Infobox NRHP}} doesn't have anything to do with it; instead, it's a use of {{Infobox designation list}} internal to {{Infobox historic site}} where no designations are provided so it produces a stylesheet but zero rows; the fix above assumed there would always be at least one row. The fix I'd recommend here is different: there are already checks in various places like if rowArgs.data and rowArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then that are detecting when the data is empty except for categories; those checks should probably be extended to also exclude TemplateStyles stylesheets. Anomie 12:24, 10 June 2026 (UTC)Reply
Same discussion is happening at #Template:Infobox biathlete produces an unwanted header even when there isn't any data shown  Martin (MSGJ · talk) 12:53, 7 July 2026 (UTC)Reply
Give Special:Diff/1363083377 a try. Anomie 23:07, 7 July 2026 (UTC)Reply

Athlete infoboxes and personal lives

[edit]

So this topic obviously is ultimately connected to the absolute overabundance of news over Kelce and Swift (groan), but I've actually found it odd for a while that athlete infoboxes never seem to cover personal lives. Marriages, children, etc. Seems like every other type of infobox for a person, be it celebrity or politician or serial killer, has a section in their infobox for notable family members of some kind. So why not athletes? Schiffy (Speak to me|What I've done) 13:37, 3 July 2026 (UTC)Reply

This page is more about the function of the template and not so much why certain templates are the way they are. You can try asking on one of the sports person infoboxes, on WT:SPORTS, or on WT:WikiProject Templates. Izno (talk) 16:42, 3 July 2026 (UTC)Reply
@Schiffy: See also my reply at Wikipedia talk:WikiProject Musicians#Why do modern musician articles so rarely feature a personal life section? --Redrose64 🌹 (talk) 13:12, 4 July 2026 (UTC)Reply
Sure but in this case, for both the athlete and the musician, we're not exactly hurting for a source. And, although this seems like an anti-Wikipedian sentiment on its surface, I feel like there's some things where the source really is just "public knowledge", such as a marriage existing. If one or both people openly acknowledge that they are married, I feel that should be good enough (unless those people are known for lying). Schiffy (Speak to me|What I've done) 16:22, 4 July 2026 (UTC)Reply

Template:Infobox biathlete produces an unwanted header even when there isn't any data shown

[edit]

Template:Infobox biathlete produces an unwanted header even when there isn't any data shown. I'm not sure what is triggering this or how to fix this.

Template:Infobox biathlete wraps Template:Infobox sportsperson. The issue is in the "Sports" section (from header33 to data55 (|module2=)). Template:Infobox biathlete's entire data is via |module2=.

Example of the issue:

Infobox
Personal information
Full namefull name
Sport
{{Infobox biathlete
| full_name        = full name
}}

Gonnym (talk) 19:18, 3 July 2026 (UTC)Reply

This is a weird one... My guess is that this is related to this change that Primefac made to {{Infobox sportsperson}} regarding the use of |autoheaders=yes. I did some testing and in the above example, |module2= definitely should be null so I see no reason that this should be happening... It may be that due Infobox sportsperson being a wrapper, info doesn't percolate correctly?
@Trappist the monk: You seem to really understand Module:Template wrapper, having written most of it... Can you perhaps spot an issue here or shed any light on where the problem may lay? Zackmann (Talk to me/What I been doing) 20:09, 3 July 2026 (UTC)Reply
Doesn't the table caption arise from this snippet in {{infobox sportsperson}}?
|title=...<div class="fn">{{If empty|{{{name|}}}|{{PAGENAMEBASE}}}}</div>...
That being true, this has nothing to do with Module:Template wrapper.
Trappist the monk (talk) 21:27, 3 July 2026 (UTC)Reply
@Trappist the monk: I think you are missing the issue here... The problem is not the title. It is the presence of the header saying "Sport" which should not be appearing... Zackmann (Talk to me/What I been doing) 21:31, 3 July 2026 (UTC)Reply
Right. Same sort of issue that has nothing to do with Module:Template wrapper. In {{infobox sportsperson}} this:
| header33 = {{#ifeq:{{If empty|{{{child|}}}|{{{embed|}}}}}|yes||{{If empty|{{{career_header|}}}|Sport}}}}
{{infobox sportsperson}} is the wrapped template so neither of |child= and |embed= are set to yes; |career_header= is not set so |header33= gets Sport.
Trappist the monk (talk) 22:06, 3 July 2026 (UTC)Reply
@Trappist the monk: sorry but you still aren't following. The problem is that in {{Infobox sportsperson}} autoheaders is turned on. Despite there seemingly being nothing passed to |module2= by {{Infobox biathlete}}, {{Infobox sportsperson}} is seeing that value as not null and therefore triggering the autoheader to turn on. It doesn't matter what the value for |header33= is in sportsperson, it should not be displaying at all in the example that Gonnym supplied at the start of this thread. I want to be clear, I'm not suggesting there is a problem with the Template wrapper module... I'm just trying to figure out WHERE the problem lies and why it isn't working at the moment. Zackmann (Talk to me/What I been doing) 22:12, 3 July 2026 (UTC)Reply
Copy the entire value assigned to |module2= in {{Infobox biathlete}} ({{infobox ...}}). Paste that into Special:ExpandTemplates. Click ok. Note the result.
Trappist the monk (talk) 22:47, 3 July 2026 (UTC)Reply
Much appreciated Trappist!
@Gonnym: it looks like <templatestyles src="Module:Infobox/styles.css"></templatestyles> is being supplied to |module2=... So somewhere we have to perform the full check. Either in {{Infobox sportsperson}} or in {{Infobox biathlete}}...
OR we need to somehow modify {{Infobox}} to not generate the template styles for an empty Infobox. Either one would work me thinks. Zackmann (Talk to me/What I been doing) 23:06, 3 July 2026 (UTC)Reply
The module should strip out templatestyles if that is the only thing that is passed when it checks for emptyness. Gonnym (talk) 07:27, 4 July 2026 (UTC)Reply
Ok, looking at the code in debug it seems that at Module:Infobox#L-379 the data's value is '"`UNIQ--templatestyles-00000000-QINU`"' and does not pass the if check. Gonnym (talk) 07:41, 4 July 2026 (UTC)Reply
@Izno can the module be modified to ignore rows if this is the only data in it? Gonnym (talk) 09:41, 6 July 2026 (UTC)Reply

Edit request 10 July 2026

[edit]

Description of suggested change: Modify Module:Infobox to remove force as an accepted argument for |italic title=, as it lacks a unique functionality and is a holdover from before {{Infobox}} and {{Italic title}} switched from wikitext to Lua implementations. Past page revisions (here and here) show that it had a functional purpose back then that wasn't preserved during the transition. Allowing force to remain an option when it no longer has any purpose is unnecessary and confusing to people unfamiliar with Lua; nowadays, regex searches (here and here) show that |italic title=force is completely unused, meaning that this change won't affect any pages.

Diff:

if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then
+
if italicTitle == '' or italicTitle == 'yes' then

IdiosyncraticLawyer (talk) 14:53, 10 July 2026 (UTC)Reply

This seems fine as that option is not mentioned anywhere in the documentation  Martin (MSGJ · talk) 11:23, 15 July 2026 (UTC)Reply
Please perform the edit, then. IdiosyncraticLawyer (talk) 12:19, 15 July 2026 (UTC)Reply
Not done for now: I don't want to dump 3.4 million pages into the job queue for such a small change. Perhaps we can bundle this with something more substantial at a later date. --Redrose64 🌹 (talk) 20:44, 15 July 2026 (UTC)Reply
There's the discussion above about an extra header showing up in some cases, that would probably be fixed by Special:Diff/1363083377 if someone wants to give that some more thorough testing. Anomie 21:59, 15 July 2026 (UTC)Reply