Wednesday, July 1, 2015

If background and colour should always be set together, why do they exist as separate properties?



The reasons for this are as follows:
- It increases the legibility of the style sheets. The background property is a complex property in CSS. If it is combined with color, the complexity will further increase.
- Color is inherited, but background isn’t. This can further increase the confusion.

No comments:

Post a Comment