Template talk:Flat list
Add topic
| On 3 August 2026, it was proposed that this page be moved to Template:Flat list. The result of the discussion was Moved as proposed as to some, moved otherwise as to others.. |
Move discussion in progress
[edit]There is a move discussion in progress on Template talk:Hlist which affects this page. Please participate on that page and not in this talk page section. Thank you. —RMCD bot 02:53, 20 August 2026 (UTC)
Inline
[edit]
Why is {{Inline list}} redirected here when this list isn't inline? I mean, it uses <div> tags, which makes a new block. Example:
Here are some things: {{flatlist|
* foo
* bar
* baz
}}
Here are some things:
- foo
- bar
- baz
From the name "inline" I was expecting it to be on the same line as the previous text.
— W.andrea (talk) 15:15, 30 August 2026 (UTC)
- Somebody boldly made a redirect they thought made sense. That's all there is to it sometimes. Izno (talk) 20:02, 31 August 2026 (UTC)
- You might ask SMcCandlish, who created the redirect. There are only five transclusions, so if SMcCandlish doesn't respond, you can nominate the redirect for deletion and the cleanup will be easy. – Jonesey95 (talk) 00:33, 1 September 2026 (UTC)
- Could have been an error on my part, but the template code actually may have changed in the interim. The essentialy-same-but-for-input-markup template
{{hlist}}now uses a Lua module, and it could probably be tweaked to also process the{{flatlist}}template.{{Hlist}}claims to support a|class=inlineparameter (which de-<div>-izes). However, in testing I don't find that it works reliably. It does seem to be working in the /doc page transcluded by that template, but when I copy one of the working-there examples to another page, it does not work, and the list displays as a block element, even if I log out and use the Wikipedia sandbox (i.e., it cannot be due to custom CSS in my account, nor the feature being disabled for the User & User_talk namespaces, where I first tried it). If it actually does look correct to you at that sandbox link above, then the issue is apparently in my own browser (presently a recent version of a Firefox fork).If the problem isn't limited to my personal setup, then there's a bug that needs to be tracked down. My first guess (I'm not a Lua coder) would be a namespace or other test of some sort that isn't coded correctly and usually returns an incorrect value that keeps disabling the inline (
<span>) variant markup feature triggered by|class=inline.Whatever the issue may be, the ideal solution probably would be to fix that, then have both templates use that module for code consistency, then change the
{{inline list}}redir to be a wrapper template instead, which would call{{flatlist}}with|class=inline{{#if:{{{class|}}}|,{{{class}}}}}and otherwise pass on all paramaterers; or just directly call the same#invoke:list|horizontalused by{{hlist}}and latterly also by{{flatlist}}.Failing that, then I suppose the redir should be replaced with a separate template that is not
Either of the approaches I tried (marking up<div>-based and does produce the desired result (presumably using the*input markup expected by{{flatlist}}not{{hlist}}'s|, given that the extant transclusions of{{inline list}}are expecting{{flatlist}}format; or support both styles.<ul>and<li>directly, with no use of<span>or<div>) here seem like they should work, but didn't quite. I suspect there is site-wide CSS forcing linebreaks before and after lists, and that this (along with using · as a list-item separator) would need to be dealt with in TemplateStyles for that template.
— SMcCandlish ☏ ¢ 😼 06:49, 1 September 2026 (UTC)
- Could have been an error on my part, but the template code actually may have changed in the interim. The essentialy-same-but-for-input-markup template
- You might ask SMcCandlish, who created the redirect. There are only five transclusions, so if SMcCandlish doesn't respond, you can nominate the redirect for deletion and the cleanup will be easy. – Jonesey95 (talk) 00:33, 1 September 2026 (UTC)
- This thread is a limitation of HTML: You cannot place an {{hlist}} inline with a
<p>...</p>unless that<p>...</p>is also marked as one of the inline flavors of display. The root cause is that you can't put a block element inside an HTML paragraph, which includes any HTML list as well as divs, and a few other structures besides (the spec doesn't use the notion of blocks and inline anymore but you can definitely go look at MDN yourself for the extra understanding if you want, but this same limitation existed in HTML 4.x). In wikitext, you can't mark the display mode of a paragraph (without resorting to HTMLwikitext). - Well, you can't do this safely anyway. Apparently one could add some CSS like
p:has(+ .hlist.inline) { display: inline }(which targets the p) but this CSS would definitely have substantial unknown impact (and I can already imagine the "but make it so it doesn't do thats" in waiting). And also we don't have access to:has()in TemplateStyles yet. - Inline hlists inside most discussion responses, inside tables, and a few other locations, will not suffer this existence.
- The name is sufficiently ambiguous that we could probably just delete it now anyway, since there are other kinds of flat lists these days ({{cslist}} doing some work somewhere I suppose), even ignoring that you can't mix paragraphs with hlists feasibly. Izno (talk) 07:06, 1 September 2026 (UTC)
- You can de-block any block element with
display: inline;, so that should work fine. I've used this before in other environments, so if it's not working here it has to be due to something site-wide (perhaps in a CSS interface page, or the parser itself doing something that it thinks is a "correction" in the course of converting wikicode input into final HTML5+CSS3 output). Anyway, yeah, if this not practically fixable, then the redir should be deleted. — SMcCandlish ☏ ¢ 😼 07:45, 1 September 2026 (UTC)- Thanks, Izno, for the explanation. Wikipedia:Redirects for discussion/Log/2026 September 1#Template:Inline list. – Jonesey95 (talk) 12:04, 1 September 2026 (UTC)
- You can de-block any block element with
- This thread is a limitation of HTML: You cannot place an {{hlist}} inline with a
- @W.andrea, Izno, Jonesey95, and SMcCandlish: I just remembered where I reported the issue before. See Template talk:Hlist#class=inline not working outside demo. --Redrose64 🌹 (talk) 21:22, 3 September 2026 (UTC)
- I have added an example to the documentation. There is probably a less hacky workaround. – Jonesey95 (talk) 22:24, 3 September 2026 (UTC)
- This is generally inaccessible, as it obviously disables the paragraphing that should otherwise be available. Izno (talk) 00:33, 4 September 2026 (UTC)
- Feel free to provide a better, more accessible workaround if one is available. – Jonesey95 (talk) 19:28, 12 September 2026 (UTC)
- There isn't one that isn't resorting to manual paragraph construction, as I said above. I would prefer it removed. Izno (talk) 20:16, 12 September 2026 (UTC)
- How do we get an inline list as shown in the example while preserving accessibility? If there is a template that does that, we can just link to it from this template's documentation. – Jonesey95 (talk) 23:13, 12 September 2026 (UTC)
- There is no such template. I already said the way to do it is to construct the paragraph manually. It will have other downstream impacts when someone tries to do it (e.g. with VisualEditor).
- My general opinion is that there isn't a need for this quality with this template or perhaps even in general. If you really need to have an HTML list inline with an HTML paragraph, what you should do is use commas or semicolons as may be needed, instead. Izno (talk) 23:56, 12 September 2026 (UTC)
- How do we get an inline list as shown in the example while preserving accessibility? If there is a template that does that, we can just link to it from this template's documentation. – Jonesey95 (talk) 23:13, 12 September 2026 (UTC)
- There isn't one that isn't resorting to manual paragraph construction, as I said above. I would prefer it removed. Izno (talk) 20:16, 12 September 2026 (UTC)
- Feel free to provide a better, more accessible workaround if one is available. – Jonesey95 (talk) 19:28, 12 September 2026 (UTC)
- This is generally inaccessible, as it obviously disables the paragraphing that should otherwise be available. Izno (talk) 00:33, 4 September 2026 (UTC)
- I have added an example to the documentation. There is probably a less hacky workaround. – Jonesey95 (talk) 22:24, 3 September 2026 (UTC)
"Template:Inline list" listed at Redirects for discussion
[edit]
The redirect Template:Inline list has been listed at redirects for discussion to determine whether its use and function meets the redirect guidelines. Readers of this page are welcome to comment on this redirect at Wikipedia:Redirects for discussion/Log/2026 September 1 § Template:Inline list until a consensus is reached. – Jonesey95 (talk) 12:04, 1 September 2026 (UTC)
Protected edit request on 12 September 2026
[edit]| It is requested that an edit be made to the fully protected template at Template:Flat list. (edit · history · last · links · sandbox · edit sandbox · sandbox history · sandbox last edit · sandbox diff · test cases · transclusion count · protection log) This template must be followed by a complete and specific description of the request, so that an editor unfamiliar with the subject matter could complete the requested edit immediately.
Edit requests to fully protected pages should only be used for edits that are either uncontroversial or supported by consensus. If the proposed edit might be controversial, discuss it on the protected page's talk page before using this template. Consider making changes first to the template's sandbox and test them thoroughly here before submitting an edit request. To request that a page be protected or unprotected, make a protection request. When the request has been completed or denied, please add the |
Update from the sandbox (diff here) to add a space to the template name in the error message and tracking category. This matches the recent page move. – Jonesey95 (talk) 19:27, 12 September 2026 (UTC)