Of course, the humor here lies in the fact that IE has had dynamic CSS calculations since IE 5, but is now in the process of removing them – just as they are being standardized in other browsers.<p>For example [1]:
<div style="left:expression(document.body.clientWidth/2-oDiv.offsetWidth/2);">Content</div><p>These expressions (or "dynamic properties") essentially evaluated JScript embedded inside a stylesheet and provided some handy hacks to get around otherwise-painful bugs. This included simple math calculations as described in the Mozilla post, but also more complex transformations such as varying the style of an element based on the current day (or other JS-retrievable information).<p>Funny to see Mozilla phasing this in just as Microsoft phases something similar out [2].<p>[1] <a href="http://blogs.msdn.com/b/ie/archive/2008/10/16/ending-expressions.aspx" rel="nofollow">http://blogs.msdn.com/b/ie/archive/2008/10/16/ending-express...</a><p>[2] <a href="http://msdn.microsoft.com/en-us/library/ms537634(VS.85).aspx#Implement" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms537634(VS.85).aspx...</a>
While calc() is nice, I rather have vars or defs so I can declare a color once and use it everywhere so if I decide to change the color I just change it in one place at the top.
I'm glad the mod operator is included, to make it easy to divide a page into n equally-sized blocks depending on some other parameter. I wonder if calc() will integrate with counters or otherwise allow the use of variables, or if that will remain the domain of JavaScript (I like having my pages work 100% without JavaScript if it's possible, to avoid NoScript issues). I guess I'll have to read the spec.
While CSS 3 gives you some new cool features, but they be another performance killers, so use it wisely.<p>e.g.<p><a href="http://support.mozilla.com/tiki-view_forum_thread.php?comments_parentId=638706&forumId=1" rel="nofollow">http://support.mozilla.com/tiki-view_forum_thread.php?commen...</a>
I've been hoping for something like this ever since I ran across <a href="http://www.marcoslot.net/alm.htm" rel="nofollow">http://www.marcoslot.net/alm.htm</a> . GUIs need programming too.