Things To Avoid When Writing CSS

I think the biggest take away from this article (and most of the responses) is there is no one size fits all answer to CSS. There are times when everything you say will be correct and the best approach to the task at hand and other times when the same approach will do nothing but cause headache.

I do agree that ideally one CSS file should be sent to the browser but why not use `@import` statements to help create that file? If I was working on a project that only I would touch and only used CSS that I authored specifically for that project then yes, one CSS file, no `@impor`s makes sense. On the other hand, if I’m working with someone else or going to be including CSS from a library like a reset or grid the one file, no `@import` approach starts to fall apart.

You’re absolutely right, CSS is a chronology and the order does matter, but I don’t think using `@import` statements categorically disrespect that. Knowing how to use partials and the order in which to include them is an amazing timesaver that ultimately allows us to write less CSS.

Like what you read? Give Justin Chick a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.