Computed Style Differences for `clip:rect()`

posted January 14th, 2010, no comments, tagged

Computed style values for clip:rect() are different in WebKit compared to Gecko and Opera. Given this test code: <div id="test" style="clip:rect(0, 50px, 50px, 0);width:100px;height:100px;position:absolute;background:red"></div> <script> window.onload = function(){ alert(window.getComputedStyle(document.getElementById("test"), null).clip); }; </script> You get: WebKit: rect(0px 50px 50px 0px) Opera: rect(0px, 50px, 50px, 0px) Gecko: rect(0px, 50px, 50px, 0px) Nothing I couldn’t fix in the regular expression I was using to split the values, [...]

Continue reading on Supercollider.