mw.ui forms: Style individual form field warnings, as well as errors
authorRoan Kattouw <roan.kattouw@gmail.com>
Wed, 27 Feb 2019 01:24:10 +0000 (17:24 -0800)
committerRoan Kattouw <roan.kattouw@gmail.com>
Wed, 27 Feb 2019 01:24:10 +0000 (17:24 -0800)
If you put a <span class="error"> inside a vform-field, it would display
correctly, but a <span class="warning"> wouldn't. Make it work for both.

Change-Id: I9e582ade2fca87782aa7be38774fa4943dc196da

resources/src/mediawiki.ui/components/forms.less

index 09bf9ca..5fa8e5a 100644 (file)
        // This specifies styling for individual field validation error messages.
        // Show them below the fields to prevent line break glitches, and leave
        // some space between the field and the error message box.
-       .mw-ui-vform-field .error {
-               display: block;
-               margin-top: 5px;
+       .mw-ui-vform-field {
+               .error,
+               .warning {
+                       display: block;
+                       margin-top: 5px;
+               }
        }
 }