Hi -
I’ve been using this excellent code by @stephen for quite awhile now. Is this still recommended? Are there any known disadvantages to using this as opposed to the new Hype tools for responsive layouts? Is anyone else still using this?
One thing I have noticed with recent designs is that the layout is not scaled when the browser is resized - after resizing the window the page must be reloaded. I’m not certain if this is a limitation of the code and I should scrap this or if it is some other issue.
Hype's Flexible Layout and Responsive Layout tools currently work at the scene and element levels, they do not apply to the document as a whole. Thus to use Hype's systems, you'd generally need to put all elements in a group for each scene and then turn on zoom contents. See this post in the same topic. Some folks still want to do this at the document level and thus this is still the recommended technique.
There might be some issue with your page. A simple test works for me – the $(window).resize(scaleSite); line should cause it to resize whenever the window changes.
If I could ask one follow up question: All of my hype projects are embedded in iframes. Can you say if the document scaling JS is perfectly applicable to iframes?
The way the document scaling (aka the code you have above) works is using the transform:scale() CSS property. This is a visual property and has the tendency to scale pixels. There are a few browser optimizations that can make iframes render text and images more sharply but also many paths that end up using pure pixels from the source size resulting in a blurred look.
Using the Flexible Layout system without using Zoom contents (this also invokes scaling) is the best way to ensure sharp rendering.