Forums

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

Home Forums Design Importing style sheets

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #297016
    DembeGomes
    Participant

    Hello everyone,,
    We previously used a centralized style sheet on our site that was this endlessly growing mess of random styles, and I recently have gone through and broken it up into subordinate style sheets that are imported to the main one. This has meant that our main style sheet is now nothing more than a list of @import calls, while the little style sheets are grouped by utility, workflow, etc.

    It works a lot better, and I think I’m never going to do anything else in the future, but I can’t help but ask – is there any reason I SHOULDN’T do this? I can’t think of one, web searches haven’t turned up any, and the subordinate style sheets are all in a folder with the same root as the main style sheet so there’s no chance any of the links would ever be broken. But still…?

    Is there any negative situation this could be opening me up to, or is it actually a best practice I have stumbled upon by accident?

    Thanks,.

    #297391
    Beverleyh
    Participant

    Browsers are unable to download @import rule resources in parallel – they are downloaded one at a time, in the order they are listed.

    Each imported file also equates to another HTTP request.

    Both of these things impact negatively on a website’s speed and performance.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design’ is closed to new topics and replies.