Refactor element dependency out of styles