Esanders has uploaded a new change for review.

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

Change subject: Revert "MediaWiki theme: Adjust ToggleSwitchWidget to match M61 
design"
......................................................................

Revert "MediaWiki theme: Adjust ToggleSwitchWidget to match M61 design"

This reverts commit 22ddbd59af53943cefd82d36a36ac62aea16145c.

Change-Id: Ic99ea6e266d78882d9f968bb8019610b24c6eaad
---
M src/themes/mediawiki/common.less
M src/themes/mediawiki/widgets.less
2 files changed, 34 insertions(+), 54 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/31/247631/1

diff --git a/src/themes/mediawiki/common.less b/src/themes/mediawiki/common.less
index dd76ce2..27b9dd3 100644
--- a/src/themes/mediawiki/common.less
+++ b/src/themes/mediawiki/common.less
@@ -4,7 +4,7 @@
 // Theme variables
 
 @active: #999;
-@background: #fff;
+@background: #ffffff;
 
 @select: #d8e6fe;
 
@@ -23,7 +23,7 @@
 @destructive-selected: #73100A;
 @destructive-fade: rgba(209,29,19,0.1);
 
-@text: #555;
+@text: #555555;
 @pressed-text: #444444;
 @pressed-color: #d0d0d0; // Used for borders and backgrounds
 @disabled-text: #cccccc;
diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index 9a27d97..1dacae4 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -1203,37 +1203,23 @@
        @travelDistance: 1.5em;
        height: 2em;
        width: @travelDistance + 2em;
-       border: 1px solid @input-border-color;
        border-radius: 1em;
-       background-color: @background;
-       .oo-ui-inline-spacing( 0.5em );
-       .oo-ui-transition(
-               background-color @quick-ease,
-               border-color @quick-ease
-       );
-       &:before {
-               content: '';
-               display: block;
-               position: absolute;
-               top: 0;
-               left: 0;
-               bottom: 0;
-               right: 0;
-               border: 1px solid transparent;
-               border-radius: 1em;
-               z-index: 1;
-       }
+       border: 1px #555 solid;
+       background: #fff;
+       .oo-ui-transition(background-color @quick-ease);
+
+       .oo-ui-inline-spacing(0.5em);
 
        &-grip {
-               top: 0.35em;
-               width: 1.2em;
-               height: 1.2em;
-               border-radius: 1.2em;
-               background-color: @text;
-               .oo-ui-transition(
-                       left @quick-ease,
-                       margin-left @quick-ease
-               );
+               top: 0.5em;
+               left: 0.5em;
+               width: 1em;
+               height: 1em;
+               margin-top: -1px;
+               border-radius: 1em;
+               background: #555;
+
+               .oo-ui-transition(left @quick-ease, margin-left @quick-ease);
        }
 
        &-glow {
@@ -1243,14 +1229,14 @@
 
        &.oo-ui-toggleWidget-on {
                .oo-ui-toggleSwitchWidget-grip {
-                       left: @travelDistance + 0.4em;
+                       left: @travelDistance + 0.5em;
                        margin-left: -2px;
                }
        }
 
        &.oo-ui-toggleWidget-off {
                .oo-ui-toggleSwitchWidget-grip {
-                       left: 0.4em;
+                       left: 0.5em;
                        margin-left: 0;
                }
        }
@@ -1261,38 +1247,32 @@
                        border-color: @progressive;
 
                        .oo-ui-toggleSwitchWidget-grip {
-                               background: @background;
-                               box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.1 );
+                               background: #fff;
                        }
                }
+
+               &:focus {
+                       outline: none;
+                       border-color: @progressive;
+
+                       &.oo-ui-toggleWidget-on {
+                               border-color: #fff;
+                               box-shadow: 0 0 0 1px @progressive;
+                       }
+               }
+
                &:hover {
                        border-color: @progressive-hover;
+                       box-shadow: 0 0 0 1px @progressive-hover;
 
                        &.oo-ui-toggleWidget-on {
+                               border-color: @progressive-hover;
                                background: @progressive-hover;
                                border-color: @progressive-hover;
-                       }
-               }
-               &:focus {
-                       border-color: @progressive;
-                       outline: none;
 
-                       &.oo-ui-toggleWidget-on {
-                               border-color: @progressive;
-
-                               &:before {
-                                       border-color: #fff;
+                               .oo-ui-toggleSwitchWidget-grip {
+                                       background: #fff;
                                }
-                       }
-               }
-               &:active,
-               &:active:hover {
-                       background-color: @progressive;
-                       border-color: @progressive;
-
-                       .oo-ui-toggleSwitchWidget-grip {
-                               background: @background;
-                               box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.1 );
                        }
                }
        }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic99ea6e266d78882d9f968bb8019610b24c6eaad
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to