Commit graph

6 commits

Author SHA1 Message Date
Arlo Breault c4fe708a36 Remove b/c for media typeof
Bug: T270150
Bug: T203211
Depends-On: I44b3fb432dd00120a4d5cd5556ba5ba8bc4e65d5
Change-Id: I58d8ce9e2e58916d55c8d838c3fbfb96e2a05f02
2022-11-30 13:55:32 -05:00
Arlo Breault b1d39a5425 Media border option applies to the media element, not the wrapper
Reported in,
https://it.wikipedia.org/w/index.php?title=Wikipedia%3ABar%2FDiscussioni%2FAggiornamento_del_parser_per_le_immagini%3A_vogliamo_testarlo%3F&type=revision&diff=130240855&oldid=130214646

The default styling in core looks like,

.mw-image-border {
	> a:first-child,
	> span:first-child {
		> *:first-child:not( .mw-broken-media ) {
			border: @border-thumbborder-screen;
		}
	}
}

The simplification here recognizes that the border option doesn't apply
to thumbs, so descendent selectors can be dispensed with, there's no
nesting in figcaptions to worry about.  That's important because
lazy-loading adds a noscript before the img tag, which would make the
selectors with first-child not apply anyways.

An img tag is used instead of the universal selector.  That seems like a
safe assumption for now and can be revisited with T314097 / T318433

Bug: T318300
Change-Id: I25f45ee794300d2ba2a38a0ab6e3741a6b1a18f2
2022-11-02 12:34:00 -04:00
Arlo Breault 8c87990f0b max-width only applies to thumbs
Not frameless or plain floated media.

Bug: T318300
Change-Id: Iced12531dc8fe416c493daa82c0aa8252f9226bd
2022-10-20 17:48:58 -04:00
Arlo Breault f0505d28a9 Hide figcaptions for plain and frameless figures
Only thumb and frame have visible captions.  This matches core's
mediawiki.skinning/content.media-common.less

Bug: T318300
Change-Id: If5713c8d629ec3c84abdb5c99eedf6f0bb408ddf
2022-09-27 17:18:02 +00:00
Arlo Breault 06000903e5 Restrict figure to the size of the media
This was proposed in I2683dcf91195ebc69686620ed11d771a9c0826df

Bug: T305357
Bug: T318300
Change-Id: If2d28847444c3f301db4669d75c7f023e68d355f
2022-09-22 17:00:29 +00:00
Timo Tijhof 0d61c78f73 Move skins.minerva.content.styles into skins.minerva.base.styles
This could be made even simpler by not using a LESS varialbe for
hacks.less, but loading it conditionally through the moduel def.
But, as a first step we can merge the two as-is.

Given that the subject and target are always referenced together
in page views, there is no need to keep an alias around. However,
I'm keeping it anyway so as to not produce any
`/* {"skins.foo":"missing"} */` appendix to the stylesheet response
for these cached URLs.

Bug: T266361
Change-Id: I8578faab8ca32bd49be90711cbd5e182763b8065
2021-06-21 17:50:37 +00:00
Renamed from resources/skins.minerva.content.styles/thumbnails.less (Browse further)