Prtksxna has uploaded a new change for review. https://gerrit.wikimedia.org/r/199246
Change subject: wip: set button height ...................................................................... wip: set button height Change-Id: I6e191c6308fbbb6075b5f4b6b8fb0ae87aa58480 --- M demos/pages/widgets.js M src/themes/mediawiki/common.less M src/themes/mediawiki/elements.less 3 files changed, 86 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/46/199246/1 diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js index 642d4e3..085817a 100644 --- a/demos/pages/widgets.js +++ b/demos/pages/widgets.js @@ -487,6 +487,90 @@ label: 'ButtonWidget (frameless, indicator)\u200E', align: 'top' } + ), + new OO.ui.FieldLayout( + new OO.ui.ButtonWidget( { + flags: [ 'constructive', 'primary' ], + label: 'Button', + } ), + { + label: 'ButtonWidget (constructive)\u200E', + align: 'top' + } + ), + new OO.ui.FieldLayout( + new OO.ui.ButtonWidget( { + flags: [ 'constructive', 'primary' ], + icon: 'picture', + } ), + { + label: 'ButtonWidget (only icon, constructive)\u200E', + align: 'top' + } + ), + new OO.ui.FieldLayout( + new OO.ui.ButtonWidget( { + flags: [ 'constructive', 'primary' ], + indicator: 'down', + } ), + { + label: 'ButtonWidget (only indicator, constructive)\u200E', + align: 'top' + } + ), + new OO.ui.FieldLayout( + new OO.ui.ButtonWidget( { + flags: [ 'constructive', 'primary' ], + icon: 'picture', + label: 'Button with Icon', + } ), + { + label: 'ButtonWidget (icon and label, constructive)\u200E', + align: 'top' + } + ), + new OO.ui.FieldLayout( + new OO.ui.ButtonWidget( { + flags: [ 'constructive', 'primary' ], + indicator: 'down', + label: 'Button with Indicator', + } ), + { + label: 'ButtonWidget (label and indicator, constructive)\u200E', + align: 'top' + } + ), + new OO.ui.FieldLayout( + new OO.ui.ButtonWidget( { + flags: [ 'constructive', 'primary' ], + icon: 'picture', + indicator: 'down', + label: 'Button with Icon & Indicator', + } ), + { + label: 'ButtonWidget (label, icon and indicator, constructive)\u200E', + align: 'top' + } + ), + new OO.ui.FieldLayout( + new OO.ui.ButtonWidget( { + flags: [ 'constructive', 'primary' ], + icon: 'picture', + indicator: 'down', + } ), + { + label: 'ButtonWidget (icon and indicator, constructive)\u200E', + align: 'top' + } + ), + new OO.ui.FieldLayout( + new OO.ui.ButtonWidget( { + flags: [ 'constructive', 'primary' ], + } ), + { + label: 'ButtonWidget (empty, constructive)\u200E', + align: 'top' + } ) ] } ), diff --git a/src/themes/mediawiki/common.less b/src/themes/mediawiki/common.less index d6e766f..3e50434 100644 --- a/src/themes/mediawiki/common.less +++ b/src/themes/mediawiki/common.less @@ -36,7 +36,7 @@ @icon-size: unit(24 / 16 / 0.8, em); @indicator-size: unit(12 / 16 / 0.8, em); - +@button-height: 1.2em; @button-label-height: unit( (24 / 16) * 0.8, em); // Theme mixins diff --git a/src/themes/mediawiki/elements.less b/src/themes/mediawiki/elements.less index 0e74310..9e540ae 100644 --- a/src/themes/mediawiki/elements.less +++ b/src/themes/mediawiki/elements.less @@ -5,6 +5,7 @@ .theme-oo-ui-buttonElement () { > .oo-ui-buttonElement-button { font-weight: bold; + height: @button-height; > .oo-ui-iconElement-icon { margin-left: 0; -- To view, visit https://gerrit.wikimedia.org/r/199246 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6e191c6308fbbb6075b5f4b6b8fb0ae87aa58480 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Prtksxna <psax...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits