Template talk:Div col

From WikiProjectMed
(Redirected from Template talk:Div col end)
Jump to navigation Jump to search

plainlist fails

Template:Div col#TemplateData gives plainlist as an example class but it has no effect after plainlist was removed from MediaWiki:Common.css in [1]. I think plainlist should work in |class= or possibly a separate parameter like |plainlist=yes. I used {{div col}}{{plainlist}}...{{endplainlist}}{{div col end}} in an article [2] but that's ugly and hard to figure out. PrimeHunter (talk) 15:30, 29 March 2023 (UTC)[reply]

I know much less than I should about CSS, but I think I may have fixed it. I then made this edit to the article in question, and it appears to have preserved the formatting. YMMV, since I am a whacker when it comes to CSS. – Jonesey95 (talk) 18:15, 29 March 2023 (UTC)[reply]
If you're going to wrap things, you should wrap them the opposite way so that the columns CSS is correctly applied.
But yes, that is the appropriate way to do things going forward. Izno (talk) 18:23, 7 November 2023 (UTC)[reply]
Just wondering though, would it be better to add <templatestyles src="Plainlist/styles.css"/> to Template:Div col rather than adding the css to Template:Div col/styles.css? -- WOSlinker (talk) 21:41, 7 November 2023 (UTC)[reply]
Neither. If you want a div col to have a plain list, wrap the div col with plainlist. Izno (talk) 21:53, 7 November 2023 (UTC)[reply]

Template-protected edit request on 19 May 2024

Under the Notable Persons area, the information for Bruce Bochy should be updated. He was, in past years, the MLB manager for the San Diego Padres and the San Francisco Giants. He is the current manager for the Texas Rangers. Davidjamesfraga (talk) 01:58, 19 May 2024 (UTC)[reply]

@Davidjamesfraga:  Not done: this is the talk page for discussing improvements to the template {{Div col}}. Please make your request at the talk page for the article concerned. When doing so, please provide reliable sources that support the change you want to be made. --Redrose64 🌹 (talk) 06:39, 19 May 2024 (UTC)[reply]

Orphaned caption problem

There's a problem when {Div col} contains a [File:...] item providing a caption (as is usual) that I noticed in this article version (since worked around). At certain window sizes (in Chrome at least) the caption gets separated from the image itself. In the two-column version of that page (using "|right" placement), the caption can be widely separated from the image by intervening text flowing to the left of the caption and the right of the image. There are workarounds, but an editor has to know that the problem could occur even if their window width doesn't happen to show any problem. So, it seems like at a minimum the documentation for this template should call out the problem and potential solutions, or, better, the software should automatically avoid this problem with the [File:...] mechanism, either inside that mechanism or in this template mechanism. - R. S. Shaw (talk) 21:45, 17 June 2024 (UTC)[reply]

I am able to reproduce this display problem in Brave for Mac (Vector 2022, desktop view). This bug was reported in 2018 as T193163, and it appears to be a bug in Chromium. I have added a note to the documentation. – Jonesey95 (talk) 22:15, 17 June 2024 (UTC)[reply]

Should take "width" and not just "colwidth"

<includeonly><templatestyles src="Div col/styles.css"/><!--
--><div class="div-col {{#ifeq:{{{small|}}}|yes|div-col-small}} {{#ifeq:{{{rules|}}}|yes|div-col-rules}} {{{class|}}}" <!--
-->{{#if:{{{colwidth|{{{width|}}}}}}{{{gap|}}}{{{style|}}}|<!--
-->style="{{#if:{{{colwidth|{{{width|}}}}}}|column-width: {{{colwidth|{{{width}}}}}};}}{{#if:{{{gap|}}}|column-gap: {{{gap}}};}}{{#if:{{{style|}}}|{{{style}}}}}"<!--
-->}}><!--
-->{{#if:{{{content|}}}|{{{content}}}</div>}}<!-- Inventory how many pages use small=yes 
-->{{#ifeq:{{{small|}}}|yes|[[Category:Pages using div col with small parameter]]}}<!--
--></includeonly>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using div col with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Div col]] with unknown parameter "_VALUE_"; use colwidth= to specify column size |ignoreblank=y | class | colwidth | content | gap | rules | small | style }}<noinclude>
{{Documentation}}
</noinclude>

See what I did? There's a {{{width|}}} in this version so that it can work with that param or "colwidth". This shouldn't break anything, but seeing as this is on 400,000 pages I want to run this by someone else for a sanity check first. Is this going to bust anything? jp×g🗯️ 21:02, 7 July 2024 (UTC)[reply]

I think you also need to add width as an option for the "Check for unknown parameters" part as well. -- WOSlinker (talk) 21:36, 7 July 2024 (UTC)[reply]
With any widely used template it is usually wise to put new code into the /sandbox version of the template and then create a few test cases on the /testcases page to show that it works without breaking anything. Something as simple as a missing or extra pipe character is easy to put into suggested code, but it will turn up problems on a well constructed testcases page. – Jonesey95 (talk) 00:48, 8 July 2024 (UTC)[reply]