3 ms·
It is the developer's concern. If one layer of presentation sets either the foreground or background color, it also must set the other. The C in CSS is cascad
by recursive 8y ago
It is the developer's concern. If one layer of presentation sets either the foreground or background color, it also must set the other. The C in CSS is cascading. Different sets of rules can be applied with differing precedence. There's no spec that I'm aware of the states that black on white is the default user-agent styling. If your site is unusable with inverted colors, it's your site that's broken.
- jameslk 8y agoNo, it isn't the developer's concern. You use cascading styles for a reason: so they can cascade. If I had to explicitly set the color, background color, font size, font weight, etc. everywhere, this would defeat the purpose of using CSS. It would bloat up stylesheets into giant download-speed-killing blobs.
- luuio 8y agoYour website CSS is inheriting the system default CSS in a sense. If you're going to override one color, you should also override the other--or override neither.
- recursive 8y agoThere is a special relationship between foreground and background color that doesn't exist between any of the other things you mentioned. If one layer sets a foreground color, and another layer sets the background color to the same thing, the result is invisible text. That can happen with independently sane values for each. That cannot happen with any combinations of the other properties you mentioned.