This is the browser's fault for violating the HTML spec. As per the specification, the default font color is complete black and the default background color is complete white. To my knowledge the only browser that does not honor this is Firefox[1], and it is an eighteen year old bug which they refuse to fix.
> This is the browser's fault for violating the HTML spec. As per the specification, the default font color is complete black and the default background color is complete white.
> The initial value for the color property is expected to be black. The initial value for the background-color property is expected to be transparent. The canvas' background is expected to be white.
However, is this also the case for form fields? Scanning through the various CSS specs I can't find any mention of form fields (e.g. buttons, text inputs, etc.). The HTML specs don't seem to specify anything w.r.t. styling form fields either.
Additionally, the “prefers-color-scheme” media query exists, which is the standard way to bring dark mode to the web and solves all the issues listed in the article by being opt-in. Firefox hasn’t implemented it, but neither has anybody but Safari yet.
What you say is true for the default, but form controls have additional UA styles applied to them that can override the default.
Just like the default border style is "none", but that's not what form controls do.
But even past that point, this is the _ua_ default. A user can always have a user stylesheet that sets whatever colors the user wants (e.g. for accessibility reasons).
And not setting background without setting color and vice versa is standard best-practice web development advice and has been for 2 decades or so now.
"The initial value for the 'color' property is expected to be black. The initial value for the 'background-color' property is expected to be 'transparent'. The canvas's background is expected to be white."
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=70315