Recommended guides for knowing which html tags to style globally?

my design skills aren't great and i've gotten to know CSS mainly through tailwind. Most of my experience is designing app components but i'm working on some blogs and am finding myself sometimes confused where i tend to end up apply tw classes on many different main tags and what nto. I notice a lot of projects style their globals.css for some of the common tags. I'm wondering if there are guides that suggest like "you should do x to your body gloally, y to your h1's etc). I feel like im a little bit dyslexic so i hate getting "lost" in my tw classes , esp. across pages or components
4 Replies
Matvey
Matvey7mo ago
Tailwind already has a css reset built-in. Other than that, It's usually not recommended to apply styles globally I usually only add color-theme and accent-color to the html in globals.css
DiamondDragon
DiamondDragon7mo ago
oh really? ive been poking around trying to find example astro repos to understanding the styling and have been coming across a lot of sites styling globally https://github.com/markhorn-dev/astro-nano/blob/main/src/styles/global.css
GitHub
astro-nano/src/styles/global.css at main · markhorn-dev/astro-nano
Astro Nano is a static, minimalist, lightweight, lightning fast portfolio and blog. - markhorn-dev/astro-nano
Matvey
Matvey7mo ago
@apply is not recommended by the tailwind team, if you can avoid it.
DiamondDragon
DiamondDragon7mo ago
So is the recommendation to just layer different layouts? Like a base page layout and a content layout that wraps all main tags?
Want results from more Discord servers?
Add your server