News for hackers. Stuff that matters.
Re:There's no excuse for sidebars on my phone by andybak on Wednesday August 17, 2011 @11:35AM (#2895671)
Isn't the point of media queries not to try and guess what type of device is being used (are people really doing that?) but to make a layout decision based on the available device information.

The author seems to be claiming that media queries are saying "I reckon this is probably a phone so I'll show them a mobile layout" whereas surely the point is for the media query to say "This device has a screen width less than x pixels so I'll move the left column underneath the content"

Re:There's no excuse for sidebars on my phone by kevinpet on Wednesday August 17, 2011 @01:51PM (#2896200)
Author here. That may be the point of media queries, but they don't (in my limited understanding) achieve that very well at this point in time. The article I linked is explicitly saying "here's a rule which will allow you to load your mobile stylesheet that works with current mobile browsers." Of course, media queries for iPhone 4 deal with different kinds of pixels, so you can't rely on the standard, you have to dig into device differences.

My goal was a simple enough solution that is suitable to use places like blogs or Hacker News. If you're trying to build a very slick eye-candy-heavy site, then media queries might be the answer, but they require more testing and thought than my solution.

Re:There's no excuse for sidebars on my phone by tingletech on Wednesday August 17, 2011 @08:50PM (#2897537)
what I like about your approach vs. media queries, as I understand it, is that you can toggle between the two views. Sometimes I want to see the screen view on my phone, and vice versa. I don't think you could do that with media queries alone.