1

Working on my own I tought I need to learn that css3 shorthand properties, because - as I know now, it affects website's loading time, so I need to optimize it a little bit. I was thinking - is there any order how to write property values, when using shorthand prop's? For example: font: 1em/1.5em bold italic serif

1 Answers1

3

With such shorthands, there's no order. On shorthands where you provide all numeric values (margin, padding, ...), the order is important :

  • 4 values : applied in that order : top right bottom left
  • 3 values : top right+left bottom
  • 2 values : top+bottom left+right
  • 1 value : top+bottom+left+right
Laurent S.
  • 263
  • 2
  • 11