From 392850cc93d413e58752ee2269f11c13d1da9719 Mon Sep 17 00:00:00 2001 From: Volker E Date: Wed, 30 Dec 2015 02:32:12 +0100 Subject: [PATCH] Remove superflous `background-size` property & make use of mixing 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 | 5 ++--- resources/src/mediawiki.ui/components/radio.less | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/resources/src/mediawiki.ui/components/checkbox.less b/resources/src/mediawiki.ui/components/checkbox.less index d44e5d71df..b0fbf515e6 100644 --- a/resources/src/mediawiki.ui/components/checkbox.less +++ b/resources/src/mediawiki.ui/components/checkbox.less @@ -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 { diff --git a/resources/src/mediawiki.ui/components/radio.less b/resources/src/mediawiki.ui/components/radio.less index 448390a726..53c22b4463 100644 --- a/resources/src/mediawiki.ui/components/radio.less +++ b/resources/src/mediawiki.ui/components/radio.less @@ -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 { -- 2.20.1