Bmansurov has uploaded a new change for review.

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

Change subject: Disable custom styling for checkboxes and radio buttons on 
non-js browsers.
......................................................................

Disable custom styling for checkboxes and radio buttons on non-js
browsers.

Change-Id: I0b9691daa61fddb484b6adff759f4413d201ae03
---
M resources/src/mediawiki.ui/components/checkbox.less
M resources/src/mediawiki.ui/components/radio.less
2 files changed, 9 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/10/184710/1

diff --git a/resources/src/mediawiki.ui/components/checkbox.less 
b/resources/src/mediawiki.ui/components/checkbox.less
index be0c638..089504a 100644
--- a/resources/src/mediawiki.ui/components/checkbox.less
+++ b/resources/src/mediawiki.ui/components/checkbox.less
@@ -36,7 +36,10 @@
 @checkboxSize: 2em;
 
 // We use the not selector to cancel out styling on IE 8 and below
-.mw-ui-checkbox:not(#noop) {
+// We also disable this styling on javascript disabled devices. This fixes the 
issue with
+// Opera Mini where checking/unchecking doesn't apply styling but potentially 
leaves other
+// more capable browsers with unstyled checkboxes.
+.client-js .mw-ui-checkbox:not(#noop) {
        // Position relatively so we can make use of absolute pseudo elements
        position: relative;
        line-height: @checkboxSize;
diff --git a/resources/src/mediawiki.ui/components/radio.less 
b/resources/src/mediawiki.ui/components/radio.less
index bb012eb..1928699 100644
--- a/resources/src/mediawiki.ui/components/radio.less
+++ b/resources/src/mediawiki.ui/components/radio.less
@@ -35,8 +35,11 @@
 
 @radioSize: 2em;
 
-// We use the not selector to cancel out styling on IE 8 and below
-.mw-ui-radio:not(#noop) {
+// We use the not selector to cancel out styling on IE 8 and below.
+// We also disable this styling on javascript disabled devices. This fixes the 
issue with
+// Opera Mini where checking/unchecking doesn't apply styling but potentially 
leaves other
+// more capable browsers with unstyled radio buttons.
+.client-js .mw-ui-radio:not(#noop) {
        // Position relatively so we can make use of absolute pseudo elements
        position: relative;
        line-height: @radioSize;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b9691daa61fddb484b6adff759f4413d201ae03
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bmansurov <[email protected]>

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

Reply via email to