"Clean Code in the Browser" Episode 2 Part 2 picks up where Part 1 left off by implementing changes to a code example using the Single Responsibility Principle and Command Query Separation.
We talk about applying the Single Responsibility Principle (or at least its spirit) to HTML documents and template files. Using several code examples we see how HTML code can be clarified by focusing on a single job for each element.
Finally, we finish the episode by applying SRP to our CSS. By carefully using SRP-inspired naming conventions and techniques in our CSS, we prevent collisions and improve the robustness of our styling code.