Esanders has uploaded a new change for review.

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

Change subject: Fix tab widget disabled styles
......................................................................

Fix tab widget disabled styles

Bonus: Add hover styles for Apex

Bug: T98197
Change-Id: I96d28bbc348780c4c1601887d6cf0be0dffb4e64
---
M demos/pages/dialogs.js
M src/themes/apex/widgets.less
M src/themes/mediawiki/widgets.less
3 files changed, 23 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/84/209184/1

diff --git a/demos/pages/dialogs.js b/demos/pages/dialogs.js
index 67f2ffc..6e9da3f 100644
--- a/demos/pages/dialogs.js
+++ b/demos/pages/dialogs.js
@@ -321,6 +321,8 @@
 
                this.indexLayout.addCards( this.cards );
                this.$body.append( this.indexLayout.$element );
+
+               this.indexLayout.getTabs().getItemFromData( 'fourth' 
).setDisabled( true );
        };
        IndexedDialog.prototype.getActionProcess = function ( action ) {
                if ( action ) {
diff --git a/src/themes/apex/widgets.less b/src/themes/apex/widgets.less
index d868635..f415b6d 100644
--- a/src/themes/apex/widgets.less
+++ b/src/themes/apex/widgets.less
@@ -545,8 +545,21 @@
                background-color: transparent;
        }
 
+       &.oo-ui-widget-enabled {
+               &:hover {
+                       background-color: rgba(255, 255, 255, 0.2);
+                       border-color: #ddd;
+               }
+
+               &:active {
+                       background-color: #fff;
+                       border-color: #ddd;
+               }
+       }
+
        .oo-ui-selectWidget-pressed &.oo-ui-optionWidget-selected,
-       .oo-ui-selectWidget-depressed &.oo-ui-optionWidget-selected {
+       .oo-ui-selectWidget-depressed &.oo-ui-optionWidget-selected,
+       &.oo-ui-optionWidget-selected:hover {
                background-color: #fff;
                border-color: #ddd;
        }
diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index 755f422..7245cd3 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -717,12 +717,14 @@
        color: #666;
        font-weight: bold;
 
-       &:hover {
-               background-color: rgba(255, 255, 255, 0.3);
-       }
+       &.oo-ui-widget-enabled {
+               &:hover {
+                       background-color: rgba(255, 255, 255, 0.3);
+               }
 
-       &:active {
-               background-color: rgba(255, 255, 255, 0.8);
+               &:active {
+                       background-color: rgba(255, 255, 255, 0.8);
+               }
        }
 
        &.oo-ui-indicatorElement .oo-ui-labelElement-label {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I96d28bbc348780c4c1601887d6cf0be0dffb4e64
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Esanders <esand...@wikimedia.org>

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

Reply via email to