Special:Block: Align partial input field better with rest of interface
authorVolker E <volker.e@wikimedia.org>
Wed, 2 Jan 2019 23:54:15 +0000 (15:54 -0800)
committerVolker E <volker.e@wikimedia.org>
Thu, 3 Jan 2019 17:12:02 +0000 (09:12 -0800)
Also include sizing foundational variables to deal with `em` rendering quirks,
aimed to be replaced by central ones in future.

Change-Id: Iba65f68b233becba6054ca068a4cf7aaee0d8e4c

resources/src/mediawiki.special.block.less

index c319294..1748635 100644 (file)
@@ -1,7 +1,19 @@
-.mw-block-page-restrictions {
-       margin-left: 2em;
+/* Special:Block styles */
+
+// OOUIHTMLForm styles
+@ooui-font-size-browser: 16; // Assumed browser default of `16px`
+@ooui-font-size-base: 0.875em; // Equals `14px` at browser default of `16px`
+
+@ooui-spacing-radio-label: 26 / @ooui-font-size-browser / @ooui-font-size-base; // Equals `1.85714286em`≈`26px`
+
+.mw-block-page-restrictions.oo-ui-fieldLayout {
+       margin-top: 0;
+       margin-left: @ooui-spacing-radio-label;
 
        .oo-ui-widget {
+               // Support:; IE 8 and browsers which don't support `calc()`
                max-width: 48em;
+               // Support: IE 9+ and all modern browsers;
+               max-width: calc( 50em - @ooui-spacing-radio-label );
        }
 }