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
Post a Comment