CSS Color ShortcutIt’s that simple. When you’re using a repeating pattern, such as #a2da2d or a hex with the same character, such as #ffffff, shorten it to 3 characters.

Examples

  1. #a2da2d becomes #a2d
  2. #ffffff becomes #fff
  3. #3214d9 stays #3214d9

This cuts down on typing, but it also cuts down on the size of your CSS file. The size difference is extremely small, but if you have a lot of visitors to your site you know the importance of cutting down file size whenever possible.