Introduction to Maintainable CSS
In the previous chapters, we learned about a wide variety of different aspects of HTML5 and CSS3, including everything you need to know as a beginner to write HTML5 and CSS3 yourself and develop your first website, but how can we help keep a website maintainable? How do we help prevent the common pitfalls of managing large codebases in CSS? How do we write code that allows a team of developers to work on a website project at the same time and that's also friendly to future developers?
In this chapter, we're going to explore what maintainable CSS looks like, how to write it, and why we use it. Let's start by understanding why we would want to write maintainable CSS.
Say you are working with a large codebase that includes thousands of lines of CSS and the client wants to change a button style that's used throughout the website. Easy, right? Well if we had written maintainable CSS for this project, then we could change this button...