YUI 2.8: Learning the Library
上QQ阅读APP看书,第一时间看更新

Chapter 2. Creating Consistency with the CSS Tools

Not only does the library provide you with a rich selection of easily implemented utilities and UI controls that save you time and effort when developing and debugging, but it is also a gift that keeps on giving with a selection of CSS Tools that every developer should have to hand.

The CSS Tools of the library are separate from the CSS files required by some of the controls in order to be displayed correctly; some of the controls contain a folder within their unpacked directories called assets, and in this folder there may be images, a stylesheet, or sometimes both depending on the control. The CSS files discussed in this chapter are separate, autonomous components of the library, and are on a level with both the utilities and controls.

In this chapter we're going to examine these tools in detail and learn exactly what they can do for your web pages and applications, if used in conjunction with other components of the library, or completely on their own.

We will look at the following:

  • What each of the four tools does
  • Rules contained within each CSS file
  • Why and how you should use the tools
  • How and why elements are normalized
  • The solid foundation provided by the Base CSS Tool
  • How fonts are styled with the Fonts CSS Tool
  • Some of the different templates found within the Grids CSS Tool