Bartosz Dziewoński has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/192088

Change subject: MediaWiki theme: Simplify spacing of checkboxes/radios in 
FieldLayouts
......................................................................

MediaWiki theme: Simplify spacing of checkboxes/radios in FieldLayouts

Previously, a spacing of 1 em between the widget and the label was
achieved by adding 0.5em margin-right on widget and 0.5em padding-left
on label. The 0.5em margin-right interferes with other uses, let's
zero it and use 1em padding-left on label instead. This is a lot
saner, too.

Also use the same method for RadioOptionWidget's label, which had a
smaller spacing previously. In Apex, too, for consistency; no visible
changes there.

Change-Id: I6bbb184a4268205cf788f86e817c390b0a2c1167
---
M src/themes/apex/widgets.less
M src/themes/mediawiki/layouts.less
M src/themes/mediawiki/widgets.less
3 files changed, 19 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/88/192088/1

diff --git a/src/themes/apex/widgets.less b/src/themes/apex/widgets.less
index e6fed28..943116d 100644
--- a/src/themes/apex/widgets.less
+++ b/src/themes/apex/widgets.less
@@ -426,6 +426,14 @@
        &.oo-ui-optionWidget-highlighted {
                background-color: transparent;
        }
+
+       &.oo-ui-labelElement .oo-ui-labelElement-label {
+               padding-left: 0.5em;
+       }
+
+       .oo-ui-radioInputWidget {
+               margin-right: 0;
+       }
 }
 
 .theme-oo-ui-menuOptionWidget () {
diff --git a/src/themes/mediawiki/layouts.less 
b/src/themes/mediawiki/layouts.less
index 47b2075..e4ad880 100644
--- a/src/themes/mediawiki/layouts.less
+++ b/src/themes/mediawiki/layouts.less
@@ -41,6 +41,7 @@
        &.oo-ui-fieldLayout-align-inline {
                &.oo-ui-labelElement > .oo-ui-fieldLayout-body > 
.oo-ui-labelElement-label {
                        padding: 0.5em;
+                       padding-left: 1em;
                }
 
                > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-field {
diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index 8df9b33..945e3a6 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -172,11 +172,6 @@
        // Prevent the fake span from jumping to the next line of text
        white-space: nowrap;
 
-       // Keep margin between the widget and its label. (Undoes 
oo-ui-inline-spacing.)
-       &:last-child {
-               margin-right: 0.5em;
-       }
-
        * {
                font: inherit;
                vertical-align: middle;
@@ -286,11 +281,6 @@
        line-height: @input-size;
        // Prevent the fake span from jumping to the next line of text
        white-space: nowrap;
-
-       // Keep margin between the widget and its label. (Undoes 
oo-ui-inline-spacing.)
-       &:last-child {
-               margin-right: 0.5em;
-       }
 
        * {
                font: inherit;
@@ -581,7 +571,7 @@
 }
 
 .theme-oo-ui-radioOptionWidget () {
-       padding: 0.25em 0;
+       padding: 0;
        background-color: transparent;
 
        &.oo-ui-optionWidget-selected,
@@ -589,6 +579,15 @@
        &.oo-ui-optionWidget-highlighted {
                background-color: transparent;
        }
+
+       &.oo-ui-labelElement .oo-ui-labelElement-label {
+               padding: 0.25em;
+               padding-left: 1em;
+       }
+
+       .oo-ui-radioInputWidget {
+               margin-right: 0;
+       }
 }
 
 .theme-oo-ui-menuOptionWidget () {

-- 
To view, visit https://gerrit.wikimedia.org/r/192088
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6bbb184a4268205cf788f86e817c390b0a2c1167
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to