6
Pro tip: Stop putting your entire CSS in one file when you start out
I used to think one big style sheet was the only way to go for my first few projects. Then last week I tried splitting it into separate files for layout, typography, and buttons on a little portfolio site. It made debugging so much easier since I wasn't scrolling through 500 lines to find one color change. Has anyone else found a setup that works better for keeping things organized?
2 comments
Log in to join the discussion
Log In2 Comments
wren97812d ago
I started naming my CSS files with a number prefix, like 01-reset.css, 02-layout.css, 03-components.css. It keeps my file list in a logical order in the editor. That way I don't waste time hunting for the right tab.
5
terry112d ago
Stop overcomplicating it before you've even got a real project going. One file is fine for most small sites and splitting things up just adds more files to manage when you're learning. You'll spend more time jumping between tabs than actually fixing the problem. Once you get past a few thousand lines then maybe think about splitting it, but for a portfolio site with 500 lines you're just making extra work for yourself.
-2