Quoting from bug 72188:
Use certain UI elements, because they are part of the functionality of Wikipedia.
Steps to Reproduce:
- Set a dark theme for the window manager on Linux
- Go to (…) the search bar underneath "Search results" when your result is not immediately redirected (These two forms both have the issue - not sure if there are other UI elements that also do).
- Type any text into the box
The text is barely readable; dark grey text on a dark grey background.
It seems that .mw-ui-input sets 'color: inherit' without corresponding 'background-color' rule, Special:Search is one of the two places in core where we use it (user login form is the second one).