DEV Community

Cover image for 5 CSS shortcuts
Ryland @ Stackbit for Stackbit

Posted on

5 CSS shortcuts

It's amazing how long I didn't know about these. They make my style sheets much more clean.

I hope they do the same for yours. :-)

1/ List properties, made simpler:


2/ The background property, made easier:


3/ Font and line-height properties, made like a pro:


4/ Margin and padding properties, made how they should be:


5/ Border property, made with love:


Top comments (1)

yamanidev profile image
Mohamed Yamani

Thanks for sharing! Indeed they make our styles cleaner and easier to skim through.

I think the title is a bit misleading though. They're called CSS shorthands, not shortcuts