Why background and color are the separate properties if they should always be set together?


There are two reasons behind this:

  • It enhances the legibility of style sheets. The background property is a complex property in CSS, and if it is combined with color, the complexity will further increase.
  • Color is an inherited property while the background is not. So this can make confusion further.

Leave a Reply

Your email address will not be published. Required fields are marked *