minor LESS CSS fixes (zero units, dimensions)
authorS Page <spage@wikimedia.org>
Thu, 14 Nov 2013 23:14:24 +0000 (15:14 -0800)
committerBartosz Dziewoński <matma.rex@gmail.com>
Thu, 27 Feb 2014 11:25:56 +0000 (12:25 +0100)
A few zero values included units, and some margin and padding dimensions
had redundant values on the end.  Regarding the latter, since CSS 1 "if
there are two or three, the missing values are taken from the opposite
side".  Leaving values off hurts clarity (I can never remember if the
order is top-left-bottom-right) but both Chromium and Firebug's CSS
inspector will display
   margin: 0 0 15px 0;
as
   margin: 0 0 15px;
anyway.

Bug: 57083
Change-Id: Ic51b2ac196a434857f19d51cd2a92686d53c4877

resources/mediawiki.ui/components/default/forms.less
resources/mediawiki.ui/mixins/forms.less

index 66f4487..5c6aa6a 100644 (file)
@@ -66,7 +66,7 @@
                        .box-sizing(border-box);
                        .agora-label-styling();
                        width: auto;
-                       margin: 0 0 0.2em 0;
+                       margin: 0 0 0.2em;
                        padding: 0;
                }
 
        .error {
                .box-sizing(border-box);
                font-size: 0.9em;
-               margin: 0 0 1em 0;
+               margin: 0 0 1em;
                padding: 0.5em;
                color: #cc0000;
                border: 1px solid #fac5c5;
 // XXX DRY: This repeats earlier styling, use an @include agora-div-styling ?
 .mw-ui-vform-div {
        display: block;
-       margin: 0 0 15px 0;
+       margin: 0 0 15px;
        padding: 0;
        width: 100%;
 }
index b32e4e7..20f42a0 100644 (file)
@@ -12,7 +12,7 @@
                        outline: 0; // Removes OS field focus
                }
 
-               box-shadow: @colorProgressiveShadow 0px 0px 5px;
+               box-shadow: @colorProgressiveShadow 0 0 5px;
 
                border-color: @colorProgressiveShadow;
        }
@@ -46,7 +46,7 @@
        & > input[type="radio"] {
                width: auto;
                height: auto;
-               margin: 0 0.1em 0em 0;
+               margin: 0 0.1em 0 0;
                padding: 0;
                border: 1px solid @colorGrayLight;
                cursor: pointer;