Pginer has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/116075

Change subject: Button group adjustments
......................................................................

Button group adjustments

In order to support toggable button groups two changes are made:
* Avoid buttons in the group to have two borders (left border is removed for 
all buttons except the 1st one).
* Allow the active state to be settable using a class (mw-ui-active) wherever 
the :active pseudo-element is used.

Change-Id: I6152c963f15420f1dcb3086e077163d28d6c6e2d
---
M resources/mediawiki.ui/components/default/buttons.less
M resources/mediawiki.ui/mixins/effects.less
2 files changed, 10 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/75/116075/1

diff --git a/resources/mediawiki.ui/components/default/buttons.less 
b/resources/mediawiki.ui/components/default/buttons.less
index 73b5dc4..e3ff370 100644
--- a/resources/mediawiki.ui/components/default/buttons.less
+++ b/resources/mediawiki.ui/components/default/buttons.less
@@ -213,6 +213,10 @@
                border-bottom-left-radius: @buttonBorderRadius;
        }
 
+       &:not(:first-child){
+               border-left: none;
+       }
+
        &:last-child{
                border-top-right-radius: @buttonBorderRadius;
                border-bottom-right-radius: @buttonBorderRadius;
diff --git a/resources/mediawiki.ui/mixins/effects.less 
b/resources/mediawiki.ui/mixins/effects.less
index eb8c203..52ae66d 100644
--- a/resources/mediawiki.ui/mixins/effects.less
+++ b/resources/mediawiki.ui/mixins/effects.less
@@ -17,7 +17,8 @@
                }
        }
 
-       &:active {
+       &:active,
+       &.mw-ui-active {
                // lessphp doesn't implement shade 
(https://github.com/leafo/lessphp/issues/528);
                // it passes it through, then ResourceLoader drops it.
                // background: shade(@bgColor, 20%);
@@ -51,7 +52,8 @@
 
                // make sure disabled buttons don't have hover and active states
                &:hover,
-               &:active {
+               &:active,
+               &.mw-ui-active{
                        box-shadow: none;
                }
        }
@@ -69,7 +71,8 @@
                color: mix(#fff, @textColor, 20%);
        }
 
-       &:active {
+       &:active,
+       &.mw-ui-active {
                // lessphp doesn't implement shade, see above
                // color: shade(@textColor, 20%);
                color: mix(#000, @textColor, 20%);

-- 
To view, visit https://gerrit.wikimedia.org/r/116075
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6152c963f15420f1dcb3086e077163d28d6c6e2d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Pginer <pgi...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to