Merge "ve.init.mw.DesktopArticleTarget.init: Update for Minerva changes again"

This commit is contained in:
jenkins-bot 2019-08-30 23:27:13 +00:00 committed by Gerrit Code Review
commit 24c577be7c
2 changed files with 9 additions and 20 deletions

View file

@ -11,19 +11,13 @@
.ve-edit-visual .mw-ui-icon {
position: absolute;
opacity: 0.65;
transform: scale( 0.6 );
right: 0;
bottom: 0;
transform-origin: bottom right;
}
.ve-edit-source .mw-ui-icon:before,
.ve-edit-source.mw-ui-icon:before,
.ve-edit-visual .mw-ui-icon:before,
.ve-edit-visual.mw-ui-icon:before {
/* Override weird styles from MW-UI */
margin-right: 0;
background-size: contain;
/* Center within the parent element (pencil icon) */
left: 50%;
top: 50%;
margin-left: -12px;
margin-top: -12px;
/* Position relative to the center, easier this way because dimensions differ */
transform: scale( 0.6 ) translate( 12px, 12px );
}
.mw-editsection-divider {
@ -34,8 +28,3 @@
.mw-editsection .ve-edit-visual {
display: inline-block;
}
#page-actions .ve-edit-source,
#page-actions .ve-edit-visual {
padding-right: 0.5em;
}

View file

@ -614,7 +614,7 @@
action = pageExists ? 'edit' : 'create',
isMinerva = mw.config.get( 'skin' ) === 'minerva',
// HACK: Minerva doesn't have a normal tabs container, this only kind of works
pTabsId = isMinerva ? 'mw-mf-page-center' :
pTabsId = isMinerva ? 'content' :
$( '#p-views' ).length ? 'p-views' : 'p-cactions',
// Minerva puts the '#ca-...' ids on <a> nodes
$caSource = $( 'li#ca-viewsource' ),
@ -652,7 +652,7 @@
$caVeEdit = $( caVeEdit );
$caVeEditLink = $caVeEdit.find( 'a' );
// HACK: Copy the 'class' attribute, otherwise the link is invisible on Minerva
// HACK: Copy the 'class' attribute, otherwise the link has no icon on Minerva
if ( isMinerva ) {
$caVeEdit.attr( 'class', $caEdit.attr( 'class' ) );
$caVeEditLink.attr( 'class', $caEditLink.attr( 'class' ) );