Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other @import vs linking styles in css Reply To: @import vs linking styles in css

#150608
rkieru
Participant

However, in reality you should really just concatenate, compress and use one file.

This.

For the purposes of development I tend to rely @import for the simple ease of being able to break CSS into smaller component files so that it’s just that much easier to work with and bug test. For production you’re much better off combining them into a single CSS file.

As georgearnall mentioned though; if you ARE going to use one of these in a live site the preferred method is <link> because it allows for multiple HTTP requests to be made whereas the @import method does not.