Jump to content

Template talk:Multiple image

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia


Dark mode and class=skin-invert-image

[edit]

Most of the time when I want to apply class=skin-invert-image to a {{multiple image}} I can do so using <div class="skin-invert-image>...</div> as recommended in [1], but there are niche scenarios like Glucose#Cyclic_forms where that is not appropriate and I would need to apply the filter to images individually. I could reformat the {{multiple image}} into a table to do that, but I wonder if support the 'class' property could be added to the template. If I knew more about Lua and CSS I would give this a shot, but at the moment this is out of my depth. ― Synpath 23:00, 21 November 2024 (UTC)[reply]

Hey Synpath, here we meet again. :D
So, I made changes to implement it: changes
CSS: Sandbox
@media screen {
  html.skin-theme-clientpref-night .multiimageinner span:not(.skin-invert-image):not(.skin-invert):not(.bg-transparent) img {
      background-color: white;
  }
}
@media screen and (prefers-color-scheme: dark) {
  html.skin-theme-clientpref-os .multiimageinner span:not(.skin-invert-image):not(.skin-invert):not(.bg-transparent) img {
      background-color: white;
  }
}
Testcase: Template:Multiple_image/testcases#Test_21
For some reason the CSS of the main is interfering with the CSS of the Sandbox, so I have another example at:
my user sandbox
I got access level to edit this template+module, but for procedure reasons it's better to check if there are any comment or objections before I commit to an important template.
-- Arthurfragoso (talk) 21:57, 1 February 2025 (UTC)[reply]
I completely forgot I made this comment, though I've at least learned some CSS in the mean time. These edits are giving me the behaviour I'm looking for and the sandbox version works great while previewing Glucose#Cyclic forms with the invert classes. The only QoL thing that would be nice is a class (not numbered) parameter that applies to all images via the wrapping container (similar to <div class="skin-invert-image">) as that case is more common. Looks great and thanks! Synpath 01:44, 2 February 2025 (UTC)[reply]
At least for now I have implemented the class[n]. It just went live. :) Arthurfragoso (talk) 02:12, 2 February 2025 (UTC)[reply]

Show image

[edit]

This template has changed in the last few years. Formerly, when you tapped on the image, you went to its File page. Now you just see a thumbnail of the image, but can not access further detail about the image.-TonyTheTiger (T / C / WP:FOUR / WP:CHICAGO / WP:WAWARD) 08:04, 9 December 2024 (UTC)[reply]

[edit]
flower
fruit

Watchduck (quack) 20:43, 4 April 2025 (UTC)[reply]

image_size and other width statements

[edit]

Shouldn't this template be fixed to show the pixel size is deprecated at Wikipedia? We no longer allow things like 200px as a static size and now use the equivalent upright=.8. We need an overhaul to allow the upright statement and then correct the document accordingly. Fyunck(click) (talk) 18:29, 1 May 2025 (UTC)[reply]

Caption overwriting image array on mobile

[edit]

Please see this talk page thread for the original issue. I am moving the discussion here. There appears to be a problem with either {{infobox}} or {{multiple image}}. See this test case (mobile link) for a simplified version. The caption is rendered on top of the images in mobile, as in this screen shot. If I expand the rendered code and add a {{clear}} between the div block for the images and the div block for the caption, it solves the problem. See this version of my sandbox in mobile. – Jonesey95 (talk) 19:47, 25 July 2025 (UTC)[reply]

It's because the thumb class becomes right floating at those sizes.. Seems there is an error somewhere in the MediaWiki core definitions, because tnone should prevent that. Regardless, it is probably better to reimplement the template with it's own css and use flexblox, as .thumb is no longer supported to begin with. The clear would be a working temporary work around. —TheDJ (talkcontribs) 14:03, 27 July 2025 (UTC)[reply]
I removed the thumb class from the sandbox, and it doesn't have the issue. Will that cause any issues? It looks like tmulti and one of tright, tleft, or tnone is assigned in each case, if I am reading the code correctly. – Jonesey95 (talk) 14:24, 27 July 2025 (UTC)[reply]
I don't think that is going to work. I can see some differences on Desktop in that case. This really seems to be a bug in Minerva (and it has been there for a LONG time. I was going to bypass it with templatestyles, but i need to target the sibling of tmulti and with the current wrapping, I don't think that's possible. hmm. —TheDJ (talkcontribs) 19:29, 27 July 2025 (UTC)[reply]
I worked around it in the article by using |footer= in this template instead of |caption= in {{infobox}}. I am not seeing differences in the desktop version of /testcases, but I see many differences in the mobile version. It leans me toward agreeing with you that something is wrong with Minerva. – Jonesey95 (talk) 23:57, 27 July 2025 (UTC)[reply]
I've filed this as phab:T400582TheDJ (talkcontribs) 19:54, 28 July 2025 (UTC)[reply]