Thanks Sandy, exactly. Do you know if any moo code exists already for modifying stylesheets? I'm lazy :) The guide has some pretty easy code I can use/edit but I'm still lazy. I saw this on Forge which might be useful as well: https://github.com/creaven/stylesheet/blob/master/Source/Stylesheet.js
Rolf On Oct 5, 7:40 am, Sanford Whiteman <[email protected]> wrote: > He's talking about dynamically adding classes to stylesheets, not > adding existing classes to elements. > > My long-view recommendation is to point to a per-session stylesheet in > your markup (give it a very long cache lifetime, so it's not an > appreciable bandwidth hit) that starts out empty on the server, rather > than instantiating the STYLE element yourself. > > For your initial rollout, add your rules to the stylesheet at runtime, > understanding you'll be discarding them on every new page view. This > gives you a good migration path for the next step: persisting session > styles onto the server, so you don't have to re-add rules unless you > get an onresize or a new session. (Or you can use client-side > persistence methods if you want.) > > A great guide to the technicals is here: > > http://www.hunlock.com/blogs/Totally_Pwn_CSS_with_Javascript > > -- Sandy
