rev 2178 -- the dreaded moment... Will it work, or will it break...?
(6 files, 12kb)
+ Okay, I'm finally committing the responsive sidebar rewrite... So, instead of a visible sidebar at the end of the page, you'll be getting a menu button (fixed on mobile devices, or static in the header on desktop browsers), that you can click to show or hide the sidebar. (index.language.php, script.js, index.css, extra.ios.css, sections.css)
* Tweaked responsive mode topics to use all available horizontal space. Seriously, you don't want stupid margins when you're already in a narrow window... (sections.css)
@ Should I target specifically mobile devices (there's a flag for that) when doing the min-resolution media query..? It would save some bandwidth on other devices... (sections.css)
@ You can also dismiss the sidebar with a click/tap outside of it. And on desktop, you can also call the sidebar by clicking the mouse wheel (i.e. middle-clicking), and clicking it again to dismiss it. It won't interfere with proper uses of the middle button to open links in new tabs, but might be a problem otherwise, so I'll need to gather feedback on this...
@ Hardware acceleration is used when available, to show the sidebar. OldIE can't use it, and I'm also forcibly disabling it when the sidebar button HTML is contained within the area that gets scrolled, because the W3C standards call for a new stacking context to be created on a fixed position element, or something to that effect, effectively justifying Chrome's decision to turned fixed elements into absolute elements when their containers are being animated... So, whatever.
@ I had to add a hack for Firefox when it comes to the middle button, not my fault. It won't work perfectly on it, hopefully I can improve that later.
@ This is all barely optimized for size. It adds about 1.3KB unzipped (and even more CSS), and 400 bytes gzipped, which is bad by my standards, but I really couldn't do better for now... And it's already much better than my initial code, which had swipe events and all (see previous commit.)