- function capitalize(prop){
- return prop.replace(/-(.)/g, function(m, m1){ return m1.toUpperCase() })
- }
-
- function imitateElement(elmOriginal, elmClone){
- var styleOriginal = getComputedStyle(elmOriginal,'');
- var styleClone = getComputedStyle(elmClone,'');
+ var style_props = {
+ width: 'width',
+ height: 'height',
+ padingLeft: 'padding-left',
+ paddingRight: 'padding-right',
+ paddingTop: 'padding-top',
+ paddintBottom: 'padding-bottom',
+ borderLeftStyle: 'border-left-style',
+ borderRightStyle: 'border-right-style',
+ borderTopStyle: 'border-top-style',
+ borderBottomStyle: 'border-bottom-style',
+ borderLeftWidth: 'border-left-width',
+ borderRightWidth: 'border-right-width',
+ borderTopWidth: 'border-top-width',
+ borderBottomWidth: 'border-bottom-width',
+ fontFamily: 'font-family',
+ fontSize: 'font-size',
+ lineHeight: 'line-height',
+ letterSpacing: 'letter-spacing',
+ wordSpacing: 'word-spacing' };
+
+ function copy_style (from, to)
+ {
+ var from_style = getComputedStyle(from,'');