Posts

Showing posts with the label transitions

Random Rant On CSS3 Transitions

Update Thanks to @gregersrygg for his link and hints, this is a hackish way to solve the problem apparently cross browser and trustable ... still a hack! // this save one char, how cool is that! !function(document){ // (C) WebReflection (As It Is) - Mit Style // we all love function declarations function redraw() { // clientHeight returns 0 if not present in the DOM // e.g. document.removeChild(document.documentElement); // also some crazy guy may swap runtime the whole HTML element // this is why the documentElement should be always discovered // and if present, it should be a node of the document // In all these cases the returned value is true // otherwise what is there cannot really be considered as painted return !!(document.documentElement || 0).clientHeight; } // ideally an Object.defineProperty // unfortunately some engine will complain // if used against DOM...