refactored css to follow D.R.Y.