Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't write margin:0; but use margin: 0;

The reason is because of shorthand: margin: 20px auto 10px; === works | margin:20pxauto10px; === fails

Therefore, putting the space after the colon is pure habit for spacing reasons.

Yes, I understand that margin:20px auto 50px; works. It's just habit and preference.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: