From 465480ce998ed2ff71cb2f41e5652e23c5216b8c Mon Sep 17 00:00:00 2001 From: Matthew Flaschen Date: Wed, 13 Nov 2013 23:30:46 -0500 Subject: [PATCH] mediawiki.ui: Fix spacing for LESS * Use tabs, per https://www.mediawiki.org/wiki/Manual:Coding_conventions/CSS * Remove unneeded space before opening brace Change-Id: I02c7bfa0327f7ff49aa7694a7a0f66e30ca55af9 --- .../components/default/buttons.less | 84 +++++------ .../components/default/forms.less | 130 +++++++++--------- .../components/vector/buttons.less | 24 ++-- .../components/vector/containers.less | 2 +- .../mediawiki.ui/components/vector/forms.less | 2 +- resources/mediawiki.ui/mixins/type.less | 4 +- resources/mediawiki.ui/mixins/utilities.less | 18 +-- skins/vector/screen.less | 2 +- 8 files changed, 133 insertions(+), 133 deletions(-) diff --git a/resources/mediawiki.ui/components/default/buttons.less b/resources/mediawiki.ui/components/default/buttons.less index 201f2f415d..10d36ff03e 100644 --- a/resources/mediawiki.ui/components/default/buttons.less +++ b/resources/mediawiki.ui/components/default/buttons.less @@ -5,65 +5,65 @@ // Button styling .mw-ui-button { - // Container layout - display: inline-block; - padding: 0.4em 1em 0.4em 1em; - margin: 0; + // Container layout + display: inline-block; + padding: 0.4em 1em 0.4em 1em; + margin: 0; - // IE6/IE7 hack - // http://stackoverflow.com/a/5838575/365238 - *display: inline; - zoom: 1; + // IE6/IE7 hack + // http://stackoverflow.com/a/5838575/365238 + *display: inline; + zoom: 1; - // Container styling - .buttonColors(); - border-radius: @buttonBorderRadius; + // Container styling + .buttonColors(); + border-radius: @buttonBorderRadius; - // Content styling - vertical-align: middle; + // Content styling + vertical-align: middle; - text-align: center; - text-decoration: none; + text-align: center; + text-decoration: none; - font-weight: bold; + font-weight: bold; - // Interaction styling - cursor: pointer; + // Interaction styling + cursor: pointer; - &:disabled, - &.mw-ui-disabled { - cursor: default; - } + &:disabled, + &.mw-ui-disabled { + cursor: default; + } - // Button sizes and displays - // ----------------------------------------- - &.mw-ui-big { - font-size: @baseFontSize * 1.3; - } - &.mw-ui-block { - display: block; - width: 100%; - } + // Button sizes and displays + // ----------------------------------------- + &.mw-ui-big { + font-size: @baseFontSize * 1.3; + } + &.mw-ui-block { + display: block; + width: 100%; + } } // This overrides an underline declaration on a:hover and a:focus in commonElements.css, which the // class alone isn't specific enough to do a.mw-ui-button { - text-decoration: none; + text-decoration: none; } // Button groups .mw-ui-button-group > * { - border-radius: 0; - float: left; + border-radius: 0; + float: left; - &:first-child{ - border-top-left-radius: @buttonBorderRadius; - border-bottom-left-radius: @buttonBorderRadius; - } + &:first-child{ + border-top-left-radius: @buttonBorderRadius; + border-bottom-left-radius: @buttonBorderRadius; + } - &:last-child{ - border-top-right-radius: @buttonBorderRadius; - border-bottom-right-radius: @buttonBorderRadius; - } + &:last-child{ + border-top-right-radius: @buttonBorderRadius; + border-bottom-right-radius: @buttonBorderRadius; + } } diff --git a/resources/mediawiki.ui/components/default/forms.less b/resources/mediawiki.ui/components/default/forms.less index 28b50d2e3a..d2554c6df7 100644 --- a/resources/mediawiki.ui/components/default/forms.less +++ b/resources/mediawiki.ui/components/default/forms.less @@ -15,65 +15,65 @@ // Style a compact vertical stacked form ("VForm") and the elements in divs // within it. .mw-ui-vform { - .box-sizing(border-box); - - width: @defaultFormWidth; - - // Immediate divs in a vform are block and spaced-out. - & > div { - display: block; - margin: 0 0 15px 0; - padding: 0; - width: 100%; - - // MW currently doesn't use the type attribute everywhere on inputs. - input, - .mw-ui-button { - display: block; - .box-sizing(border-box); - margin: 0; - width: 100%; - } - - // We exclude these because they'll generally use mw-ui-button. - // Otherwise, we'll unintentionally override that. - input:not([type=button]):not([type=submit]):not([type=file]), { - .agora-field-styling(); // mixins/forms.less - } - - label { - display: block; - .box-sizing(border-box); - .agora-label-styling(); - width: auto; - margin: 0 0 0.2em 0; - padding: 0; - } - - // Override input styling just for checkboxes and radio inputs. - input[type="checkbox"], - input[type="radio"] { - display: inline; - .box-sizing(content-box); - width: auto; - } - - } - - // HTMLForm uses error, SpecialUserlogin (login and create account) uses - // errorbox. - // TODO move errorbox from mediawiki.special.vforms.css into here. - .error { - .box-sizing(border-box); - font-size: 0.9em; - margin: 0 0 1em 0; - padding: 0.5em; - color: #cc0000; - border: 1px solid #fac5c5; - background-color: #fae3e3; - text-shadow: 0 1px #fae3e3; - word-wrap: break-word; - } + .box-sizing(border-box); + + width: @defaultFormWidth; + + // Immediate divs in a vform are block and spaced-out. + & > div { + display: block; + margin: 0 0 15px 0; + padding: 0; + width: 100%; + + // MW currently doesn't use the type attribute everywhere on inputs. + input, + .mw-ui-button { + display: block; + .box-sizing(border-box); + margin: 0; + width: 100%; + } + + // We exclude these because they'll generally use mw-ui-button. + // Otherwise, we'll unintentionally override that. + input:not([type=button]):not([type=submit]):not([type=file]), { + .agora-field-styling(); // mixins/forms.less + } + + label { + display: block; + .box-sizing(border-box); + .agora-label-styling(); + width: auto; + margin: 0 0 0.2em 0; + padding: 0; + } + + // Override input styling just for checkboxes and radio inputs. + input[type="checkbox"], + input[type="radio"] { + display: inline; + .box-sizing(content-box); + width: auto; + } + + } + + // HTMLForm uses error, SpecialUserlogin (login and create account) uses + // errorbox. + // TODO move errorbox from mediawiki.special.vforms.css into here. + .error { + .box-sizing(border-box); + font-size: 0.9em; + margin: 0 0 1em 0; + padding: 0.5em; + color: #cc0000; + border: 1px solid #fac5c5; + background-color: #fae3e3; + text-shadow: 0 1px #fae3e3; + word-wrap: break-word; + } } // -------------------------------------------------------------------------- @@ -95,21 +95,21 @@ // You generally don't need to use this class if is within an Agora // form container such as mw-ui-vform .mw-ui-input { - .agora-field-styling(); // mixins/forms.less + .agora-field-styling(); // mixins/forms.less } // Apply mw-ui-label to individual elements to style them. // You generally don't need to use this class if