change style attr css in template to trimmed css