Over two years ago I wrote this tweet: “Still amazed by how many GOOD websites and apps don’t specify a default background color or text color.” Tragically the situation has remained virtually unchanged to this day. Fellow web developers, it is high time we address this issue.
I will grant that in most cases, failure to specify these default colors is likely an innocent oversight. Yet I have spoken to certain developers who insist that the user should always be allowed to customize these values. For quite some time now, my own browser default colors have been assigned slightly off-kilter values, thereby providing instant and obvious feedback for sites that have neglected to set them explicitly. Let’s look at a few screenshots then discuss why these sites need to change pronto.
The first observation that should be apparent is that these backgrounds were not intended to look this way. Since most browser software sets white as the default background color, many web developers simply fail to notice that they never specifically mentioned “white” in their CSS. You may ask, “But how many users actually set their own background color?” My answer would be, “It doesn’t matter.” This problem is so quick to fix that the above sites (and many others) should take the five minutes necessary to make the change.
Besides, the real purpose of setting default colors in your browser is for those rare pages that do not use CSS at all. In these cases, it makes sense for users to set their own values. And many users prefer a “high contrast” setting with black backgrounds and white text. Take another look at the screenshots above, and imagine them as black instead of yellow. The middle site would appear largely blank in the lower half, since the black text (specified by the CSS) would blend into the black background (specified by the user).
Once a web designer chooses to implement CSS for a website, that CSS should account for all aspects of the design, including the default background, text color, and link colors. I would encourage my fellow developers to change their own browser defaults to non-standard colors, so they can quickly and easily shore up their CSS during initial development. Just think for a moment if other designers and artists throughout history had failed to account for a background color.
NOTE: This post originally appeared on Kevin Dees: Programming Jedi Juggernaut.