Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why is there such a strong focus on "responsive" CSS? It has never made much sense to me, because my desktop will never turn into a tablet, and my tablet will never turn into a smartphone. It seems as though creating a better server-side abstraction that lets me produce different markup that shares much, but not all, of the CSS would be more effective from a development time perspective.

If you use responsive CSS, what am I missing?



How do you make sure you support all the possible devices that will request a page from your server? If you divide between desktop and mobile, what do you serve a tablet? If you make a tablet layout, what do you do if it changes orientation? Once you added the tablet, what do you serve a web-enabled TV? A handheld console? A high-resolution display?

Responsive is about responding to container characteristics, instead of relying on the assumption that a certain known device has certain characteristics. Even with responsive, the rabbit hole goes waaay down, but at least you're avoiding the ghetto effect of "supporting" a set list of circumstances.


Some examples:

* Resizing your browser window.

* Changing font-size for accessibility (Ctrl+, Ctrl-)

* Moving your browser between multiple screens

If responsive was server-side, each of these scenarios would cause a page reload in order to accomodate the adjusted layout.

Responsive design doesn't just mean CSS media queries. It more commonly means using floating div/ul instead of tables for layout.


>Resizing your browser window.

I love responsive design for exactly this. I often have small or large browser windows, and being able to choose instead of being constrained by fixed-width sites is great.


Perhaps it would appear then that I am the only one that never ever ever resizes my browser. OP's question has always puzzled me too.


One issue with server side solutions in general is caching becomes really hard or ineffective.

With the client side solutions, like responsive CSS, you're serving one cached, distributed, minified set of data to every client.


What? Really? Having several version of the CSS would not be hard to do in most frameworks.

Also only sending the needed CSS for mobile browsers makes it that much faster.


With a responsive design I don't have to write three separate apps for mobile, tablet, and desktop. Instead I adapt the CSS to fit each device. It reduces repetition and keeps everything clean.


Example: http://www.timeforzen.com

(Resize your window and you'll see how everything re-aligns for desktops, tablets, and smartphones)

I chose responsive css because I can code it once, and it'll work on all devices. No bloat, no separate versions to maintain. Why wouldn't you want that? Especially with more and more consumers buying mobile and tablet devices. You increase your potential audience with a few lines of css code. Why do it through server-side code and have seperate versions to maintain during each and every update? As long as you plan ahead, your design can be responsive with literally a few lines of css code.


It's less about it being responsive in real-time and more about it being responsive across a wide array of devices with different size screens.


Rotating from portrait to landscape.


layout should be responsive also to amount of content, especialy on websites focused on user generated content




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: