#2 code refactor for css