Today I Learned — font shorthand in CSS

1 · Amit Merchant · March 1, 2023, 3:38 p.m.
I have been making websites for more than 10 years now and one of the things I inevitably use is CSS. I use CSS a lot and yet, I still learn new things about it every now and then. And today, I learned about the font shorthand property in CSS. So, let’s say you want to set the font size, font family, font weight, and font style of an element. You can do it like so. h1 { font-size: 2rem; font-family: "Roboto", sans-serif; font-weight: 500; line-height: 1.5; font-style: italic; } But, u...