css media queries, one or many for mobile optimization -


i know using media queries mobile first way should make website faster on mobile devices. wonder if there difference in using lot of media queries, this:

#first {}  @media screen , (min-width: 37.5em) {     #first {} }  #second {}  @media screen , (min-width: 37.5em) {     #second {} } 

instead of using 1 big 1 desktop styles, this:

#first {}  #second {}  @media screen , (min-width: 37.5em) {     #first {}      #second {} } 

which better, performance, or matter? think first approach more easy read when dealing lots of styles.

they both same thing thing makes second approach better not repeating yourself. keeping code dry , located in 1 spot working media query. plus rewriting @media screen every time pain in ass , time consuming.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -