Merge "Apply tablet restrictions to image floating in Parsoid"

This commit is contained in:
jenkins-bot 2018-10-08 18:55:16 +00:00 committed by Gerrit Code Review
commit 943a4df894
1 changed files with 33 additions and 22 deletions

View File

@ -2,6 +2,8 @@
* Style Parsoid HTML+RDFa output consistent with wikitext from PHP parser. * Style Parsoid HTML+RDFa output consistent with wikitext from PHP parser.
*/ */
@import '../../minerva.less/minerva.variables';
/* /*
* Auto-numbered external links * Auto-numbered external links
* (copied from MediaWiki's content.parsoid.less) * (copied from MediaWiki's content.parsoid.less)
@ -23,30 +25,39 @@ figure[ typeof*='mw:Image' ],
figure[ typeof*='mw:Video' ], figure[ typeof*='mw:Video' ],
figure[ typeof*='mw:Audio' ] { figure[ typeof*='mw:Audio' ] {
max-width: 100%; max-width: 100%;
// Defaults to right alignment when not explicitly set. Should be flippable. // Centered on non-tablet
margin: 0.6em 0 0.6em 1.4em; margin: 0 auto;
}
&.mw-halign-left { @media screen and ( min-width: @width-breakpoint-tablet ) {
/* @noflip */ figure[ typeof*='mw:Image' ],
margin: 0.6em 1.4em 0.6em 0; figure[ typeof*='mw:Video' ],
/* @noflip */ figure[ typeof*='mw:Audio' ] {
clear: left; // Defaults to right alignment when not explicitly set. Should be flippable.
/* @noflip */
float: left;
}
&.mw-halign-right {
/* @noflip */
margin: 0.6em 0 0.6em 1.4em; margin: 0.6em 0 0.6em 1.4em;
/* @noflip */
clear: right;
/* @noflip */
float: right;
}
&.mw-halign-center { &.mw-halign-left {
margin: 0.6em auto 0.6em auto; /* @noflip */
clear: none; margin: 0.6em 1.4em 0.6em 0;
float: none; /* @noflip */
clear: left;
/* @noflip */
float: left;
}
&.mw-halign-right {
/* @noflip */
margin: 0.6em 0 0.6em 1.4em;
/* @noflip */
clear: right;
/* @noflip */
float: right;
}
&.mw-halign-center {
margin: 0.6em auto 0.6em auto;
clear: none;
float: none;
}
} }
} }