Refactor styles for masonry