mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-24 22:25:27 +00:00
b1d39a5425
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
39 lines
978 B
Plaintext
39 lines
978 B
Plaintext
/**
|
|
* Style Parsoid HTML+RDFa output consistent with wikitext from PHP parser.
|
|
*/
|
|
|
|
@import '../../minerva.less/minerva.variables.less';
|
|
|
|
/*
|
|
* Auto-numbered external links
|
|
* (copied from MediaWiki's content.parsoid.less)
|
|
*/
|
|
.mw-parser-output {
|
|
counter-reset: mw-numbered-ext-link;
|
|
|
|
a[ rel~='mw:ExtLink' ]:empty:after {
|
|
content: '[' counter( mw-numbered-ext-link ) ']';
|
|
counter-increment: mw-numbered-ext-link;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Block media items
|
|
* (mostly derived from MediaWiki's content.media-common.less)
|
|
*/
|
|
figure[ typeof~='mw:File/Thumb' ],
|
|
figure[ typeof~='mw:File/Frame' ],
|
|
/* TODO(T203211): Remove "Image|Video|Audio" when version 2.4.0 of the content
|
|
* is no longer supported
|
|
*/
|
|
figure[ typeof~='mw:Image/Thumb' ],
|
|
figure[ typeof~='mw:Video/Thumb' ],
|
|
figure[ typeof~='mw:Audio/Thumb' ],
|
|
figure[ typeof~='mw:Image/Frame' ],
|
|
figure[ typeof~='mw:Video/Frame' ],
|
|
figure[ typeof~='mw:Audio/Frame' ] {
|
|
max-width: 100%;
|
|
// Centered on non-tablet
|
|
margin: 0 auto;
|
|
}
|