refactoring attr to styles #384