CSS shorthand vs longhand?

  • You shouldn’t worry about CSS performance unless you have profiled the page load and it has became the bottleneck (I doubt, it is almost always multiple HTTP requests and images).
  • Any competent developer can remember clockwise from top for the order of values.
  • Shorthand means less bytes to be sent, which a CSS minifier doesn’t optimise itself (I don’t think).
  • I’d only use the long method if setting one value, e.g. padding-left: 3px.

Leave a Comment