Remove superflous `background-size` property & make use of mixing
authorVolker E <volker.e@wikimedia.org>
Wed, 30 Dec 2015 01:32:12 +0000 (02:32 +0100)
committerJdlrobson <jrobson@wikimedia.org>
Wed, 17 Feb 2016 23:30:36 +0000 (23:30 +0000)
Removing superflous `background-size` property, which is overwritten
few lines below and make use of correspondent mixin in `:checked`
state.

Change-Id: I4f24c84c2f93bd85f495ff74ae21fbc210c18f57

resources/src/mediawiki.ui/components/checkbox.less
resources/src/mediawiki.ui/components/radio.less

index d44e5d7..b0fbf51 100644 (file)
@@ -75,8 +75,7 @@
                        background-position: center center;
                        background-origin: border-box;
                        background-repeat: no-repeat;
-                       .background-size( @checkboxSize - 0.2em, @checkboxSize - 0.2em );
-                       background-size: 0 0;
+                       .background-size( 0, 0 );
                        .box-sizing( border-box );
                        position: absolute;
                        // align the checkbox to middle of the text
@@ -93,7 +92,7 @@
 
                // when the input is checked, style the label pseudo before element that followed as a checked checkbox
                &:checked + label::before {
-                       background-size: 100% 100%;
+                       .background-size( 100%, 100% );
                }
 
                &:active + label::before {
index 448390a..53c22b4 100644 (file)
@@ -67,8 +67,7 @@
                        background-origin: border-box;
                        background-position: center center;
                        background-repeat: no-repeat;
-                       .background-size( @radioSize, @radioSize );
-                       background-size: 0 0;
+                       .background-size( 0, 0 );
                        .box-sizing( border-box );
                        position: absolute;
                        left: 0;
@@ -81,7 +80,7 @@
 
                // when the input is checked, style the label pseudo before element that followed as a checked radio
                &:checked + label::before {
-                       background-size: 100% 100%;
+                       .background-size( 100%, 100% );
                }
 
                &:active + label::before {