DEV Community

Discussion on: Discuss: Would you have one style sheet for all or make a style sheet for each page when making a basic website?

Collapse
 
valeriavg profile image
Valeria

Depends on a website.
To avoid a layout shift when page loads and the styles kick in I prefer to have crucial styles in the head and the rest in css file(s).

But if all pages are very different from one another it doesn't really make sense to group them together. And if the styles are really short, it doesn't make sense to separate them to a file.

Nowadays I'd start with everything in <style> and extract when it gets too crowded