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
 
rustinedave profile image
Rustine Dave Lontayao

Here's how I usually organize my stylesheets:

  • global : has all definitions for components I'd prolly use all throughout the site, that is typography, colors, sizings, etc.
  • responsive : here's where I write all of my media queries. Mind that in this setup, good documentation is a must since you may be compiling styles for different pages.
  • page-specific : there are some styles that I just can't put inside global. Here's where "overriding" usually happens. Say, I have a card component on global which has narrow spacings and I want some cards in certain pages to have more padding.