Use CSS Shorthand
Using shorthand CSS declarations will lead to quicker coding and debugging. It might also save some errors from mistyping multiple declarations.
When a rule has multiple similiar declarations for a single selector, such as
padding-top: 10px; padding-right: 20px; padding-bottom: 30px; padding-left: 40px;
they can be combined into one line, such as
padding: 10px 20px 30px 40px;
The trick to remember which position controls which direction is TRouBLe: Top, Right, Bottom, Left.
The main declarations that use shorthand for are
Bonus: Hex Shortcut
Six hexidecimal digits used for CSS colors can be condensed down to three if they are grouped in identical pairs.
#000000 can be written
#990055 can be written
#F091A4cannot be shortened since the pairs aren’t identical.