Streamline button margin calculation for outline parts

Generally the default button margin on the parts is 24px. The only
exception are the placeholder and wikitext when they are the last
parts in the outline.

Bug: T312644
Change-Id: Ie513bf1c022b2696cc92aacbbca59ddf6e55043e
This commit is contained in:
WMDE-Fisch 2022-08-02 15:02:02 +02:00
parent cdf9a59278
commit 7f4645bbe0
3 changed files with 7 additions and 13 deletions

View file

@ -29,19 +29,9 @@
margin-top: -24px; margin-top: -24px;
} }
/* no margin for labels and wikitext */ &:last-child.ve-ui-mwTransclusionOutlineWikitextWidget,
&:last-child { &:last-child.ve-ui-mwTransclusionOutlinePlaceholderWidget {
margin-bottom: -24px; margin-bottom: 0;
/* margin for last text */
.ve-ui-mwTransclusionOutlineTemplateWidget-no-template-parameters {
margin-bottom: 48px;
}
/* margin for last checkbox in the sidebar */
.ve-ui-mwTransclusionOutlineParameterWidget:last-child {
margin-bottom: 48px;
}
} }
.ve-ui-mwTransclusionOutlineButtonWidget { .ve-ui-mwTransclusionOutlineButtonWidget {

View file

@ -18,6 +18,8 @@ ve.ui.MWTransclusionOutlinePlaceholderWidget = function VeUiMWTransclusionOutlin
icon: 'puzzle', icon: 'puzzle',
label: label label: label
} ); } );
this.$element.addClass( 've-ui-mwTransclusionOutlinePlaceholderWidget' );
}; };
/* Inheritance */ /* Inheritance */

View file

@ -17,6 +17,8 @@ ve.ui.MWTransclusionOutlineWikitextWidget = function VeUiMWTransclusionOutlineWi
ariaDescriptionSelected: ve.msg( 'visualeditor-dialog-transclusion-wikitext-widget-aria-selected' ), ariaDescriptionSelected: ve.msg( 'visualeditor-dialog-transclusion-wikitext-widget-aria-selected' ),
ariaDescriptionSelectedSingle: ve.msg( 'visualeditor-dialog-transclusion-wikitext-widget-aria-selected-single' ) ariaDescriptionSelectedSingle: ve.msg( 'visualeditor-dialog-transclusion-wikitext-widget-aria-selected-single' )
} ); } );
this.$element.addClass( 've-ui-mwTransclusionOutlineWikitextWidget' );
}; };
/* Inheritance */ /* Inheritance */