jenkins-bot has submitted this change and it was merged.

Change subject: MediaWiki theme: Improve `:active:focus` states on 
ButtonElements
......................................................................


MediaWiki theme: Improve `:active:focus` states on ButtonElements

Improving visual appearance of `:active:focus` (mousedown) states
on ButtonElements – `:focus` indicator shouldn't be visible as long as
user is interacting with the element.
Similar to Id29445aa9ad976c09832d660e7a7f0bcbf4cbb67
Also unifying selector coding style and follow notation without extra
`& ` as anywhere else.

Change-Id: I304f4c3505db959d72d2e17b807419ac833cfc99
---
M src/styles/widgets/SelectFileWidget.less
M src/themes/mediawiki/elements.less
M src/themes/mediawiki/widgets.less
3 files changed, 14 insertions(+), 10 deletions(-)

Approvals:
  WMDE-Fisch: Looks good to me, but someone else must approve
  Jforrester: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/styles/widgets/SelectFileWidget.less 
b/src/styles/widgets/SelectFileWidget.less
index 937459e..ea89d8f 100644
--- a/src/styles/widgets/SelectFileWidget.less
+++ b/src/styles/widgets/SelectFileWidget.less
@@ -28,7 +28,7 @@
                }
 
                &.oo-ui-widget-disabled {
-                       & > .oo-ui-buttonElement-button > [type='file'] {
+                       > .oo-ui-buttonElement-button > [type='file'] {
                                display: none;
                        }
                }
diff --git a/src/themes/mediawiki/elements.less 
b/src/themes/mediawiki/elements.less
index 1db47ab..5121e72 100644
--- a/src/themes/mediawiki/elements.less
+++ b/src/themes/mediawiki/elements.less
@@ -109,6 +109,7 @@
                        &.oo-ui-buttonElement-pressed > 
input.oo-ui-buttonElement-button,
                        &.oo-ui-buttonElement-pressed > 
.oo-ui-buttonElement-button:active {
                                color: @color-default-active;
+                               box-shadow: none;
                        }
 
                        &.oo-ui-flaggedElement {
@@ -206,21 +207,21 @@
                }
 
                &.oo-ui-widget-disabled {
-                       & > .oo-ui-buttonElement-button {
+                       > .oo-ui-buttonElement-button {
                                background-color: 
@background-color-disabled-filled;
                                color: @color-disabled-filled;
                                border: @border-disabled;
                        }
 
                        & + .oo-ui-widget-disabled {
-                               & > .oo-ui-buttonElement-button {
+                               > .oo-ui-buttonElement-button {
                                        border-left-color: 
@border-color-disabled-filled;
                                }
                        }
                }
 
                &.oo-ui-widget-enabled {
-                       & > .oo-ui-buttonElement-button {
+                       > .oo-ui-buttonElement-button {
                                background-color: @background-color-framed;
                                color: @color-default;
                                border: @border-default;
@@ -237,11 +238,13 @@
                                }
                        }
 
-                       & > .oo-ui-buttonElement-button:active,
+                       > .oo-ui-buttonElement-button:active,
+                       > .oo-ui-buttonElement-button:active:focus,
                        &.oo-ui-buttonElement-pressed > 
.oo-ui-buttonElement-button {
                                background-color: darken( 
@background-color-default, 15% );
                                color: @color-default-active;
                                border-color: @border-color-default-active;
+                               box-shadow: none;
                        }
 
                        &.oo-ui-buttonElement-active > 
.oo-ui-buttonElement-button {
@@ -286,7 +289,7 @@
                                        }
                                }
 
-                               & > .oo-ui-buttonElement-button {
+                               > .oo-ui-buttonElement-button {
                                        > .oo-ui-iconElement-icon,
                                        > .oo-ui-indicatorElement-indicator {
                                                opacity: 
@opacity-icon-default-selected;
@@ -304,15 +307,16 @@
                }
        }
 
-       & > .oo-ui-buttonElement-button:hover {
+       > .oo-ui-buttonElement-button:hover {
                > .oo-ui-labelElement-label {
                        color: @hover;
                }
        }
 
-       & > .oo-ui-buttonElement-button:active,
+       > .oo-ui-buttonElement-button:active,
+       > .oo-ui-buttonElement-button:active:focus,
        &.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button {
-               & > .oo-ui-labelElement-label {
+               > .oo-ui-labelElement-label {
                        color: @active;
                        box-shadow: none;
                }
diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index fa006bf..7740247 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -1035,7 +1035,7 @@
        }
 
        // Clear button
-       & > .oo-ui-buttonElement {
+       > .oo-ui-buttonElement {
                display: none;
        }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I304f4c3505db959d72d2e17b807419ac833cfc99
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Prtksxna <[email protected]>
Gerrit-Reviewer: WMDE-Fisch <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to