Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialWesley Picotte
1,531 PointsEmbed or link to reset css?
My question pertains to site speed.
I typically use Normalize as my reset css styles and to minimize server calls and generally optimize page load speed, will paste it into the top of my site stylesheet and then, when development is done, minify it.
What's your POV on this practice? Better to link separately to the file in the head section, or???
3 Answers
Dave McFarland
Treehouse TeacherSounds like a good approach Wesley Picotte You do want to minimize server calls -- multiple calls for files can lead to a big performance hit, much more than one call to a larger file. The fact that you're minifying before production is great -- this will make the file much smaller, and with only a single call for CSS, you're doing a great job.
Martin Ruston
30,736 PointsPersonally I do the same, although I use Sass to compile a number of individual stylesheets into one minified production stylesheet.
Wesley Picotte
1,531 PointsThanks guys. Martin Ruston, I'm looking forward to learning more about Sass; part of the reason I'm here.
Dave McFarland
Treehouse TeacherDefinitely! And you're not going to get much better than our SASS course -- http://teamtreehouse.com/library/sass-basics. Taught by none other than Hampton Catlin the creator of SASS.
Martin Ruston
30,736 PointsYes the Sass course was great and I learnt a lot from it and will go over the videos again at some point to pick up more tips. I originally started to use Sass to spit my stylesheet down into modules of vanilla CSS as I've since started to use variables for variables (for colours etc. to make maintenance easier), I now need to start making use of nesting and mixins. It is changing the way that I write CSS for the better.