For years, the Web standards community has talked about the separation of concerns. Separate your CSS from your JavaScript from your HTML. We all do that, right? CSS goes into its own file; JavaScript goes in another; HTML is left by itself, nice and clean. CSS Zen Garden proved that we can alter a design into a myriad of permutations simply by changing the CSS. However, we’ve rarely seen the flip side of this — the side that is more likely to occur in a project: the HTML changes. We modify the HTML and then have to go back and revise any CSS that goes with it.
The bonus of this is that each of these rules affects only a single
element: the element that the class is applied to. The CSS is easier to
read and easier to debug, and it’s clear what belongs to what and what
it does.
Comments
Be the first to write a comment
You must me logged in to write a comment.