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 trialrachaelallison
9,521 Pointswhy is there a CSS within the CSS?
In this video there's a CSS file linked within the CSS file...what's going on here? What is this file-within-a-file for?
thanks treehouse community! :)
1 Answer
gareth o'connor
1,755 PointsThey can be used for many reasons, most likely legacy such as the ability to apply styles to certain browsers only (the ones which supported @import)
It's more likely these days that it's used in order to organise css into logical blocks/files. Stylesheets can get very big and messy. Just be aware that loading via import isn't as efficient as loading separaetly via <link href...>