Merge "DatabaseMssql: Don't duplicate body of makeList()"
[lhc/web/wiklou.git] / resources / src / mediawiki.ui / components / checkbox.less
index be0c638..4829f5f 100644 (file)
 @checkboxSize: 2em;
 
 // We use the not selector to cancel out styling on IE 8 and below
-.mw-ui-checkbox:not(#noop) {
+// We also disable this styling on javascript disabled devices. This fixes the issue with
+// Opera Mini where checking/unchecking doesn't apply styling but potentially leaves other
+// more capable browsers with unstyled checkboxes.
+.client-js .mw-ui-checkbox:not(#noop) {
        // Position relatively so we can make use of absolute pseudo elements
        position: relative;
-       line-height: @checkboxSize;
+       display: table;
 
        * {
                // reset font sizes (see bug 72727)
                max-width: none;
                margin: 0;
                margin-right: 0.4em;
+               display: table-cell;
+
+               & + label {
+                       display: table-cell;
+               }
 
                // the pseudo before element of the label after the checkbox now looks like a checkbox
                & + label::before {
                        border-radius: @borderRadius;
                        width: @checkboxSize;
                        height: @checkboxSize;
+                       line-height: @checkboxSize;
                        background-color: #fff;
                        border: 1px solid @colorGray7;
+                       // align the checkbox to middle of the text
+                       top: 50%;
+                       margin-top: -1em;
                        .background-image-svg('images/checked.svg', 'images/checked.png');
                        .background-size( @checkboxSize - 0.2em, @checkboxSize - 0.2em );
                        background-repeat: no-repeat;