What selector is best for setting font across a page?

I'm currently using body but I'm wondering if * would be better, or if there's an even better alternative.
4 Replies
winniffy
winniffy•2y ago
i use body
MarkBoots
MarkBoots•2y ago
body {
font-family: "bla bla"
}
input, select, textarea, button { font-family:inherit }
body {
font-family: "bla bla"
}
input, select, textarea, button { font-family:inherit }
then it will also do it for browser styled elements such a <input> etc All the rest will just cascade down
Kevin Powell
Kevin Powell•2y ago
Yeah, rely on inheritance, not * whenever possible. * is an expensive property, and it has downsides vs. inheritance for things like typography (like having to re-declare things too often)
Xan
XanOP•2y ago
Thanks for the help, everyone in this thread 🙂👌
Want results from more Discord servers?
Add your server