I was wondering about this, and after a bit of digging, found this resource, linked in this answer.
The resource states:
Background vs background-color
Comparison of 18 color swatches rendered 100 times on a page as small rectangles, once with background and once with background-color.
| -------------------------------------------- | | Page | Safari 7.0.1 | Chrome 33 | | -----------------|-------------------------- | | background | 44.9ms | 34.45ms | | -----------------|-------------------------- | | background-color | 87.5ms | 69.34ms | | -------------------------------------------- |
Now, I would imagine background-color
being way faster, as the resource thought as well:
I thought that when a browser sees
background: #000;
, they really seebackground: #000 none no-repeat top center;
. I don't have a link to a resource here, but I recall reading this somewhere.
What gives? Why is background
faster than background-color
?