Moves display logic to css