As someone who's been asleep at the switch with regards to responsive design I get the sense that it's, well, hard. Has anyone written about the "responsive design vs forking the website for mobile" tradeoff? If I were to start hacking together a site today I would probably just create two or three completely different layouts and DRY things up as much as I could in code, instead of trying to get the stars to align a…
I've always assumed the benefit is that you don't have to maintain a separate set of files for each window size... but it seems like, for all intents and purposes, you might as well be if you have to set up special cases for all sorts of window sizes, just in one document.
Responsive Web Design – Advanced Lesson
41–50 of 50 posts
Re: Responsive Web Design – Advanced Lesson
#42Earlier quoted context omitted.
I've always assumed the benefit is that you don't have to maintain a separate set of files for each window size... but it seems like, for all intents and purposes, you might as well be if you have to set up special cases for all sorts of window sizes, just in one document.
Yeah I guess what I mean is you should always aim for DRY but who says the code reuse has to happen on the client? Why not do at least some of the necessary changes based upon screen size upstream on the server if it reduces complexity? My guess is this is probably harder for designers than hacking on CSS. I don't buy the argument that it's more or less DRY depending on where the reuse occurs. The only argument is th…
The use case that someone might come to your site on a tablet, laptop and/or phone is a pretty common use case nowadays. Designing and maintaining one site to cover all of those is the goal. Simple MQ's to shift to each one is much easier to maintain than an entire other codebase.
Re: Responsive Web Design – Advanced Lesson
#43Is there any point in having medium-grey text on a slightly lighter grey backgound, other than to make it very hard to read? http://contrastrebellion.com/
Re: Responsive Web Design – Advanced Lesson
#44As someone who's been asleep at the switch with regards to responsive design I get the sense that it's, well, hard. Has anyone written about the "responsive design vs forking the website for mobile" tradeoff? If I were to start hacking together a site today I would probably just create two or three completely different layouts and DRY things up as much as I could in code, instead of trying to get the stars to align a…
People often forget a 300kb image on a desktop site is fine, but making your site react to the width of a screen you're shrinking the image down but the file size remains the same. A 300kb image on a mobile site via a 3G connection times two or three can spell disaster for some people's data plans especially if they're close to going over.
Also a handy thing to remember with the target divided by the context is to multiply it by 100 to get the actual percentage value. I know you can simply move the decimal over two places, but that eliminates the step and ensures your calculations are always correct. So the final formula becomes: target / context * 100 = responsive percentage value.
Re: Responsive Web Design – Advanced Lesson
#45I've only ever done responsive via JavaScript, as I often need to target as many old and new browsers as possible. It seems like my method is way easier and faster than this "new" fancy CSS way. Does anyone have any experiences with both approaches, and if yes, which do you prefer? For those wondering: My method is pretty simple - I use a global ratio which is multiplied with width/heights, and a resize() function, w…
I'd be interested to see this idea in action - got any sites up as examples?
Re: Responsive Web Design – Advanced Lesson
#46As someone who's been asleep at the switch with regards to responsive design I get the sense that it's, well, hard. Has anyone written about the "responsive design vs forking the website for mobile" tradeoff? If I were to start hacking together a site today I would probably just create two or three completely different layouts and DRY things up as much as I could in code, instead of trying to get the stars to align a…
However, if you're running a photo-blog, then you probably want to only serve smaller images to mobile clients, and larger ones to desktop clients. Same goes for interactive websites. If your website has some novel navigation mechanism, or is very JS heavy, then you probably want to think more about whether you simply need to split your website into two separate versions: one for mobile, one for desktop.
I think a decent 'cut-off' point is when you start needing to muck about with handling viewport sizes through JS. At this point, it seems to me like your design isn't capable of handling the various screen sizes: if my mobile browser needs to run a bunch of javascript just to display correctly - by turning a menu bar into a drop-down menu for example, or modifying the page's navigation mechanisms - then in all honestly you might save yourself time and effort by simply creating a separate mobile version.
Obviously, there are exceptions to any rule, and I don't think there are any true clear boundaries, and even the 'JS boundary' can be managed nicely through progressive enhancement and dependency management.
Personally, I'm pretty happy with the 'one size fits all' solution. I don't think there's anything inherently wrong with media queries and simply modifying the CSS based on viewport size. It seems much more work to create and maintain separate versions of a website's theme for different viewport sizes.
Re: Responsive Web Design – Advanced Lesson
#47As someone who's been asleep at the switch with regards to responsive design I get the sense that it's, well, hard. Has anyone written about the "responsive design vs forking the website for mobile" tradeoff? If I were to start hacking together a site today I would probably just create two or three completely different layouts and DRY things up as much as I could in code, instead of trying to get the stars to align a…
Assuming we're still considering responsive design, if designed from a mobile-first perspective you'd be surprised how clean the code can be to deal with this. Start with minimal resources and most of your content stacked vertically so that it's lightweight and easy to consume on a touch device. Providing you've used relative units (ems in particular) you can scale up for larger screen with super simple media queries that just bump the font-size on body (e.g. body { font-size: 120%; }). You can find an awesome overview of this approach on Trent Walton's site [1]. Compare this with a hacky approach of doing desktop-first - you're loading assets (probably) unnecessarily, hiding chunks of markup to never be displayed, hammering your CSS to fit your desktop peg into a mobile hole. I know this doesn't cover everything, and any sufficiently complex site will require more than just bumping font-size, but honestly it doesn't have to be super difficult and full of horrible workarounds.
Now with the resposnive vs. separate site debate, the way I've always thought of it is responsive site for web sites, separate sites for web apps. Apps are sufficiently complex, with enough interaction that they require fundamental changes in HTML, CSS and JS to adapt to touch devices. Which leads onto the next point, serve a separate version of a web app based on touch/non-touch not window size, as it is the interaction method that should dictate design choices not how small the window is. It might then be wise to adopt a hybrid approach for your touch-specific app, where you scale up/down for larger/smaller touch-based devices.
Note that some of this may change and become significantly simpler with the advent of the Shadow DOM [2] and Flexbox layouts [3]
[1] http://trentwalton.com/2013/01/07/flexible-foundations/
[2] http://www.html5rocks.com/en/tutorials/webcomponents/shadowd...
Re: Responsive Web Design – Advanced Lesson
#48Re: Responsive Web Design – Advanced Lesson
#49Earlier quoted context omitted.
I've always assumed the benefit is that you don't have to maintain a separate set of files for each window size... but it seems like, for all intents and purposes, you might as well be if you have to set up special cases for all sorts of window sizes, just in one document.
Yeah I guess what I mean is you should always aim for DRY but who says the code reuse has to happen on the client? Why not do at least some of the necessary changes based upon screen size upstream on the server if it reduces complexity? My guess is this is probably harder for designers than hacking on CSS. I don't buy the argument that it's more or less DRY depending on where the reuse occurs. The only argument is th…
Re: Responsive Web Design – Advanced Lesson
#50I've only ever done responsive via JavaScript, as I often need to target as many old and new browsers as possible. It seems like my method is way easier and faster than this "new" fancy CSS way. Does anyone have any experiences with both approaches, and if yes, which do you prefer? For those wondering: My method is pretty simple - I use a global ratio which is multiplied with width/heights, and a resize() function, w…
I'd be interested to see this idea in action - got any sites up as examples?