Merge "Cache countable statistics to prevent multiple counting on import"
[lhc/web/wiklou.git] / resources / src / mediawiki.ui / components / radio.less
index 425ec1b..1928699 100644 (file)
 
 @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;
@@ -60,6 +63,7 @@
 
                // the pseudo before element of the label after the radio now looks like a radio
                & + label::before {
+                       .transition( 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) );
                        content: '';
                        cursor: pointer;
                        .box-sizing(border-box);
                        height: @radioSize;
                        background-color: #fff;
                        border: 1px solid @colorGray7;
-               }
-
-               // when the input is checked, style the label pseudo before element that followed as a checked radio
-               &:checked + label::before {
                        .background-image-svg('images/radio_checked.svg', 'images/radio_checked.png');
                        .background-size( @radioSize, @radioSize );
                        background-repeat: no-repeat;
                        background-position: center center;
                        background-origin: border-box;
+                       background-size: 0 0;
+               }
+
+               // when the input is checked, style the label pseudo before element that followed as a checked radio
+               &:checked + label::before {
+                       background-size: 100% 100%;
                }
 
                &:active + label::before {