Skip to content

Commit

Permalink
Ensure noresize also works when placed on figure
Browse files Browse the repository at this point in the history
In mobile, noresize only has to be a parent of an img to take effect.
In these newer styles however, we scope to figure as we do not want to
influence inline images.

It is possible to use File syntax's class= to set noresize on figure.
Additionally the Imagemap extension places noresize on the figure element

Bug: T368034
Change-Id: I15f550f7be31c22baef5267708697310c7d9f8a4
  • Loading branch information
hartman committed Jun 20, 2024
1 parent 74a7f1d commit 9fcd969
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions resources/src/mediawiki.skinning/content.media-screen.less
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,15 @@ body.skin--responsive .mw-parser-output {
}

/**
* When the noresize class is used e.g. on a panorama or image map
* with clickable regions (T22030), do not subject the image to a max-width rule.
*/
.noresize figure img.mw-file-element {
max-width: none;
* When the noresize class is used e.g. on a panorama or image map
* with clickable regions (T22030), do not subject the image to a max-width rule.
*
* [[File:example.jpg|thumb|class=noresize]] and imagemap extension put the class on figure itself (T368034)
*/
.noresize figure,
figure.noresize {
img.mw-file-element {
max-width: none;
}
}
}

0 comments on commit 9fcd969

Please sign in to comment.