Merge "Remove redundant styling rules and fix center/none halign for figures"

This commit is contained in:
jenkins-bot 2022-09-27 20:22:55 +00:00 committed by Gerrit Code Review
commit 5e945307b6
2 changed files with 14 additions and 41 deletions

View file

@ -80,6 +80,20 @@ A file for css that optimises the Minerva skin on larger devices.
/* @noflip */
margin-right: 0;
}
&.mw-halign-none {
float: none;
clear: none;
margin-left: 0;
margin-right: 0;
}
&.mw-halign-center {
float: none;
clear: none;
margin-left: auto;
margin-right: auto;
}
}
table {

View file

@ -41,44 +41,3 @@ figure[ typeof~='mw:Audio/Frame' ] {
.mw-image-border {
display: inline-block;
}
@media screen and ( min-width: @width-breakpoint-tablet ) {
figure[ typeof~='mw:File/Thumb' ],
figure[ typeof~='mw:File/Frame' ],
/* TODO: 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' ] {
// Defaults to right alignment when not explicitly set. Should be flippable.
margin: 0.6em 0 0.6em 1.4em;
&.mw-halign-left {
/* @noflip */
margin: 0.6em 1.4em 0.6em 0;
/* @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;
}
}
}