From 05c3114029bf9a8a000fc92272f4c5b1acfc12d1 Mon Sep 17 00:00:00 2001 From: Volker E Date: Tue, 23 Feb 2016 13:29:06 -0800 Subject: [PATCH] mediawiki.ui: Buttons should receive `max-width` Applying `max-width` to mw-ui-buttons and center-aligning subgroup when class `mw-ui-block` is available. Bug: T95367 Change-Id: I4aaf24042f451c3b5489f49098f4b9e7eeef8098 --- resources/src/mediawiki.ui/components/buttons.less | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/resources/src/mediawiki.ui/components/buttons.less b/resources/src/mediawiki.ui/components/buttons.less index 4ffaeeee40..71febe3a45 100644 --- a/resources/src/mediawiki.ui/components/buttons.less +++ b/resources/src/mediawiki.ui/components/buttons.less @@ -31,8 +31,11 @@ font-size: 1em; // Container layout display: inline-block; + min-width: 4em; + max-width: 28.75em; // equivalent to 460px, @see T95367 padding: .5em 1em; margin: 0; + border-radius: @borderRadius; .box-sizing( border-box ); // Disable weird iOS styling @@ -43,15 +46,11 @@ *display: inline; zoom: 1; - // Container styling - .button-colors( #fff, #ccc, #777 ); - border-radius: @borderRadius; - min-width: 4em; - // Ensure that buttons and inputs are nicely aligned when they have differing heights vertical-align: middle; // Content styling + .button-colors( #fff, @colorGray12, @colorGray7 ); text-align: center; font-weight: bold; @@ -112,6 +111,8 @@ &.mw-ui-block { display: block; width: 100%; + margin-left: auto; + margin-right: auto; } // Progressive buttons -- 2.20.1