Tuesday, July 8, 2014

finding @media

i don't learn the usual way. i reverse engineer. first time i learned html 10 years ago was by doing view source - and i still do. it was both fun and productive for me. and so i did.

but it took me a while before i found what i was trying to look for (and i don't even know what i was looking for, trouble with reverse *engineering).

*now, i'm reminded of the movie: paycheck with ben affleck. it was about reverse engineering. it was a good one. you should watch it

going back...

i was looking for:

  1. a website with rwd(responsive web design)
  2. clean readable codes(codes that uses line breaks)
  3. line that would make me think(this is the "i dont know what i was looking for" part)
and i found: 
  1. foodsense.is
  2. its clean css code
  3. and that line that made me think: line 1185
@media only screen and (min-width: 768px) and (max-width: 991px) {
so, i searched high and low... and found:
That’s a media query. It prevents the CSS inside it from being run unless the browser passes the tests it contains. - Paul D. Waite on stackoverflow.com
here's a recommended reading to understand @media better, courtesy of w3.org

let me leave you at that and i'll go study some more..

No comments:

Post a Comment