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

Summary

The CSS Tools are the smallest and without doubt the easiest component of the library to use, but their contribution in the form of time-saving and functionality provided is no less than that of the utilities and controls.

First the Reset CSS Tool provides normalization services to the most common HTML elements so that borders, margins, and padding, among other things, are set to zero across all of the most common browsers.

The Base CSS Tool then builds upon the level foundation provided by Resets to give certain elements back some of the styling that marks them out from other elements. This tool is the only one that isn't part of the minified aggregated resets-fonts-grids.css file.

Next, all of your page text is standardized to the Arial font and is given a fixed line height. Sizes are also fixed to a consistent size across the document with the Fonts CSS Tool.

Finally, the precise layout of your page can be declared through the use of a range of CSS classes, IDs, and templates defined for you in the Grids CSS Tool.