= document.createTreeWalker(this, NodeFilter.SHOW_ELEMENT, null), dupeWalker = document.createTreeWalker(dupe, NodeFilter.SHOW_ELEMENT, null); ! function copyStyle(fromNode, toNode) { toNode.style.cssText = window.getComputedStyle(fromNode, null).cssText; return toNode; } ! copyStyle(this, dupe); ! while(walker.nextNode()) { copyStyle(walker.currentNode, dupeWalker.nextNode()); } ! return dupe; } gist.github.com/mwunsch/8830293