Forums

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

Home Forums CSS SCSS – Use different .scss files for different viewports.

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #286001
    ainsley_clark
    Participant

    Morning all,

    Wondering your thoughts on the speed of using different stylesheets for different sized viewports.
    Doing this:

    rel=”stylesheet” media=”screen and (min-device-width: 800px)” href=”800.css”

    Does this dramatically improve speed? Is there a slight lag when the browser loads in different .css files?

    Also Im wondering if this is possible with .scss files, for example:
    @import ‘mobile’; when screen is below 700px

    Is this remotely possible, or would I have to export each file as a stylesheet ?

    Many thanks in advance.

    #286009
    Dagny
    Participant

    This is odd, I’d say if you css is incredibly big (like MBs of css) it might make sense, but you’d lose on caching. Also, what happens when the user turns their tablet / phone to landscape – you’d have to wait for the css to be downloaded???

    I’d stick to the old system, like I said unless the css is very big.

    #286014
    ainsley_clark
    Participant

    Many thanks for your reply. Cleared things up for me.

    #286100
    tomasland
    Participant

    Hi there. Thank you for the information.

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