Avoid overlapping text on Russian and Farsi projects

Account for the fact that many wikis use `mbox-text-div` rather
than `mbox-text-span` and that the element might not be display
block/inline block

Bug: T206887
Change-Id: I6b3cee4339fc7ddb035a99fb4929b1ab67f22333
This commit is contained in:
jdlrobson 2018-11-12 16:44:06 -08:00
parent 6bc349f1d5
commit f173dabf75
2 changed files with 4 additions and 1 deletions

View File

@ -39,7 +39,10 @@ table.ambox {
// Assuming that most ambox templates wrap content in this element.
// See https://en.wikipedia.org/w/index.php?title=Module:Message_box&action=raw (search for 'mbox-text-span').
// https://phabricator.wikimedia.org/T206887 suggests .mbox-text-div is also needed.
.mbox-text-div,
.mbox-text-span {
display: inline-block;
max-height: @contentLineHeight * 2em;
// All will have this height (approx 2 lines) even if a single line e.g. {{dictdef}} when on mobile.
// Overriden later in tablet styles.

View File

@ -86,7 +86,7 @@
.text( mw.msg( 'skin-minerva-issue-learn-more' ) );
if ( $( '.mw-collapsible-content' ).length ) {
// e.g. Template:Multiple issues
$learnMore.insertAfter( $metadata.find( '.mbox-text-span' ) );
$learnMore.insertAfter( $metadata.find( '.mbox-text-span, .mbox-text-div' ) );
} else {
// e.g. Template:merge from
$learnMore.appendTo( $metadata.find( '.mbox-text' ) );