Forums

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

Home Forums CSS Is mobile first css still relevant in 2018?

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

    I was curious about the argument for writing base styles for mobile and then using media queries to modify css for desktop. Phones have gotten really fast. Is mobile first css still relevant in 2018?

    #269270
    Paulie_D
    Member

    “Mobile first” has nothing to do with speed.

    It has to do with providing the layout that is required for Mobile first and them adapting that requirement for larger screens.

    It’s generally easier to design/code for a small screen first before enhancing for larger devices.

    #269581
    mattjames
    Participant

    Thanks for your thoughts Paulie_D! Isn’t there an argument that if base styles are written for mobile, mobile devices have less css to parse because they ignore irrelevant media queries? For example say the base style for a div is yellow and there is a media query making it green on desktop, the mobile device will ignore the query making the div green/won’t have to switch from yellow to green.

    #269589
    Paulie_D
    Member

    CSS files are tiny in comparison to say a single image.

    Really, CSS is downloaded and parsed (as a whole file) really quickly.

    Media queries may not apply but the browser still has to read and parse them to make sure they don’t apply….then they are cached ready for when they do apply.

    The CSS file isn’t re-downloaded/re-read (AFAIK) when you change the screen width….it’s just applied differently.

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