HTML and CSS Reference
In-Depth Information
The bonus of this is that each of these rules a " ects only a single element:
the element that the class is applied to. Our CSS is easier to read and easier
to debug, and it's clear what belongs to what and what it does.
It's All Coming Undone
We've just seen two ways to decouple HTML from CSS:
1.
Using child selectors,
2. Using class selectors.
In addition, we've seen how naming conventions allow for clearer, faster,
simpler and more understandable code.
These are just a couple of the concepts that I cover in “Scalable and
Modular Architecture for CSS,” and I invite you to read more.
POSTSCRIPT
In addition to the resources linked to above, you may wish to look into BEM,
an alternative approach to and framework for building maintainable CSS.
Mark Otto has also been documenting the development of Twitter
Bootstrap, including the recent article “Stop the Cascade,” which similarly
discusses the need to limit the scope of styles.
Search WWH ::




Custom Search