Possible Duplicate:
Using 3-digit color codes rather than 6-digit color codes in CSS
I was checking out the CSS of the new YouTube website. There are many examples of usages of 6-digit hex color codes when 3 are sufficient, eg:
color:#990000color:#550000color:#000000color:#005500
I always prefer 3 characters in that case. Perhaps YouTube feels this makes it clearer and shortening this to 3 characters is not worth the minimal savings. That is fine. I am just wondering if there is not an additional technical benefit in using 6 characters – for instance, lack of compatibility of 3 chars with certain old browsers. Any idea?
There is no significant difference.
Yes, they could shave a few bytes off their network payload by shortening
#990000to#900and I admit that I’m surprised that their CSS minifier didn’t do that.Then again, if they are sending it over the network using compression (which they probably are), then compression will totally take care of those three bytes.
Hence, no significant difference.