Properly copies style attributes