VolkerE has uploaded a new change for review.
https://gerrit.wikimedia.org/r/263216
Change subject: Unify `-disabled` variables usage in MediaWiki theme
......................................................................
Unify `-disabled` variables usage in MediaWiki theme
Exchange fixed values with variables values on disabled elements
and align variables' names to coding conventions.
Change-Id: I2cf38a2c2ffd17582547c35a737b2409ec0d7ea0
---
M src/themes/mediawiki/common.less
M src/themes/mediawiki/elements.less
M src/themes/mediawiki/layouts.less
M src/themes/mediawiki/tools.less
M src/themes/mediawiki/widgets.less
5 files changed, 45 insertions(+), 42 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/16/263216/1
diff --git a/src/themes/mediawiki/common.less b/src/themes/mediawiki/common.less
index 22c3d90..ad42e1b 100644
--- a/src/themes/mediawiki/common.less
+++ b/src/themes/mediawiki/common.less
@@ -26,9 +26,12 @@
@text: #555;
@pressed-text: #444;
@pressed-color: #d0d0d0; // Used for borders and backgrounds
-@disabled-text: #ccc;
-@disabled-framed-text: #fff;
-@disabled-background: #ddd;
+
+@background-color-disabled: #ddd;
+@color-disabled: #ccc;
+@color-disabled-framed: #fff;
+@border-color-disabled: @background-color-disabled;
+@opacity-disabled: 0.2;
@neutral-button-border: 1px solid #cdcdcd;
diff --git a/src/themes/mediawiki/elements.less
b/src/themes/mediawiki/elements.less
index e00cf81..19e518e 100644
--- a/src/themes/mediawiki/elements.less
+++ b/src/themes/mediawiki/elements.less
@@ -84,7 +84,7 @@
}
&.oo-ui-widget-disabled > .oo-ui-buttonElement-button {
- color: @disabled-text;
+ color: @color-disabled;
&:focus {
box-shadow: none;
@@ -92,7 +92,7 @@
> .oo-ui-iconElement-icon,
> .oo-ui-indicatorElement-indicator {
- opacity: 0.2;
+ opacity: @opacity-disabled;
}
}
}
@@ -164,9 +164,9 @@
}
&.oo-ui-widget-disabled > .oo-ui-buttonElement-button {
- color: @disabled-framed-text;
- background: @disabled-background;
- border: 1px solid @disabled-background;
+ background: @background-color-disabled;
+ color: @color-disabled-framed;
+ border: 1px solid @border-color-disabled;
}
&.oo-ui-widget-enabled {
diff --git a/src/themes/mediawiki/layouts.less
b/src/themes/mediawiki/layouts.less
index 679589b..25f5643 100644
--- a/src/themes/mediawiki/layouts.less
+++ b/src/themes/mediawiki/layouts.less
@@ -75,7 +75,7 @@
}
&-disabled > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label {
- color: #ccc;
+ color: @color-disabled;
}
&-messages {
diff --git a/src/themes/mediawiki/tools.less b/src/themes/mediawiki/tools.less
index c40b4ae..fc0b9d5 100644
--- a/src/themes/mediawiki/tools.less
+++ b/src/themes/mediawiki/tools.less
@@ -141,11 +141,11 @@
&.oo-ui-widget-disabled > .oo-ui-tool-link {
.oo-ui-tool-title {
- color: #ccc;
+ color: @color-disabled;
}
.oo-ui-iconElement-icon {
- opacity: 0.2;
+ opacity: @opacity-disabled;
}
}
@@ -167,11 +167,11 @@
&.oo-ui-widget-disabled > .oo-ui-toolGroup-tools > .oo-ui-tool {
> a.oo-ui-tool-link {
.oo-ui-tool-title {
- color: #ccc;
+ color: @color-disabled;
}
.oo-ui-iconElement-icon {
- opacity: 0.2;
+ opacity: @opacity-disabled;
}
}
}
@@ -355,7 +355,7 @@
&.oo-ui-widget-disabled {
.oo-ui-tool-link {
.oo-ui-tool-title {
- color: #ccc;
+ color: @color-disabled;
}
.oo-ui-tool-accel {
@@ -363,18 +363,18 @@
}
.oo-ui-iconElement-icon {
- opacity: 0.2;
+ opacity: @opacity-disabled;
}
}
}
}
&.oo-ui-widget-disabled {
- color: #ccc;
+ color: @color-disabled;
.oo-ui-indicatorElement-indicator,
.oo-ui-iconElement-icon {
- opacity: 0.2;
+ opacity: @opacity-disabled;
}
}
}
@@ -410,21 +410,21 @@
&.oo-ui-widget-disabled {
.oo-ui-tool-link .oo-ui-tool-title {
- color: #ccc;
+ color: @color-disabled;
}
.oo-ui-tool-link .oo-ui-iconElement-icon {
- opacity: 0.2;
+ opacity: @opacity-disabled;
}
}
}
&.oo-ui-widget-disabled {
- color: #ccc;
+ color: @color-disabled;
.oo-ui-indicatorElement-indicator,
.oo-ui-iconElement-icon {
- opacity: 0.2;
+ opacity: @opacity-disabled;
}
}
}
diff --git a/src/themes/mediawiki/widgets.less
b/src/themes/mediawiki/widgets.less
index 6598d8c..4ab1cdb 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -82,7 +82,7 @@
width: @icon-size;
&.oo-ui-widget-disabled {
- opacity: 0.2;
+ opacity: @opacity-disabled;
}
}
@@ -93,7 +93,7 @@
margin: @indicator-size / 2;
&.oo-ui-widget-disabled {
- opacity: 0.2;
+ opacity: @opacity-disabled;
}
}
@@ -145,9 +145,9 @@
&.oo-ui-widget-disabled {
.oo-ui-dropdownWidget-handle {
- color: #ccc;
+ color: @color-disabled;
text-shadow: 0 1px 1px #fff;
- border-color: #ddd;
+ border-color: @border-color-disabled;
background-color: #f3f3f3;
&:focus {
@@ -155,7 +155,7 @@
}
}
.oo-ui-indicatorElement-indicator {
- opacity: 0.2;
+ opacity: @opacity-disabled;
}
}
@@ -449,8 +449,8 @@
&.oo-ui-widget-disabled {
select {
- color: #ccc;
- border-color: #ddd;
+ color: @color-disabled;
+ border-color: @border-color-disabled;
background-color: #f3f3f3;
}
}
@@ -614,14 +614,14 @@
&.oo-ui-widget-disabled {
input,
textarea {
- color: #ccc;
+ color: @color-disabled;
text-shadow: 0 1px 1px #fff;
- border-color: #ddd;
+ border-color: @border-color-disabled;
background-color: #f3f3f3;
}
.oo-ui-iconElement-icon,
.oo-ui-indicatorElement-indicator {
- opacity: 0.2;
+ opacity: @opacity-disabled;
}
.oo-ui-labelElement-label {
color: #ddd;
@@ -762,15 +762,15 @@
}
&.oo-ui-widget-disabled &-handle {
- color: #ccc;
+ color: @color-disabled;
text-shadow: 0 1px 1px #fff;
- border-color: #ddd;
+ border-color: @border-color-disabled;
background-color: #f3f3f3;
cursor: default;
> .oo-ui-iconElement-icon,
> .oo-ui-indicatorElement-indicator {
- opacity: 0.2;
+ opacity: @opacity-disabled;
}
}
@@ -814,13 +814,13 @@
}
&.oo-ui-widget-disabled {
- color: #ccc;
+ color: @color-disabled;
text-shadow: 0 1px 1px #fff;
- border-color: #ddd;
+ border-color: @border-color-disabled;
background-color: #f3f3f3;
> .oo-ui-indicatorElement-indicator {
- opacity: 0.2;
+ opacity: @opacity-disabled;
}
}
}
@@ -847,7 +847,7 @@
}
&.oo-ui-widget-disabled {
- color: #ccc;
+ color: @color-disabled;
}
}
@@ -873,7 +873,7 @@
&.oo-ui-widget-disabled {
.oo-ui-iconElement-icon,
.oo-ui-indicatorElement-indicator {
- opacity: 0.2;
+ opacity: @opacity-disabled;
}
}
}
@@ -1289,12 +1289,12 @@
}
&.oo-ui-widget-disabled {
- background: @disabled-background;
- border-color: @disabled-background;
+ background: @background-color-disabled;
+ border-color: @border-color-disabled;
outline: 0;
.oo-ui-toggleSwitchWidget-grip {
- background: @disabled-framed-text;
+ background: @color-disabled-framed;
}
}
}
--
To view, visit https://gerrit.wikimedia.org/r/263216
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2cf38a2c2ffd17582547c35a737b2409ec0d7ea0
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits