Hacker News new | ask | show | jobs
by lenary 5618 days ago
for your issue with wanting to swap stylesheets when the user clicks (mobile | standard) or whatever, try doing all your media queries in the stylesheet <link> tags themselves, then using javascript to unset all the media="" parts, or change them so that the correct stylesheet applies, rather than faking browser width that might fuck around with other JS functions
1 comments

Thanks lenary, I guess that'd be fine for a small amount of adjusted styles for mobile. Becomes a bit of a mess pretty quickly though.