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

Tools of the trade

There are some similarities between the CSS Tools and the other components of the library and there are of course some differences. Like each of the other components, there is also a full version of each file with comments and whitespace preserved for readability, and a minified production version.

If you wish, you can also have Yahoo! serve the CSS files used by the tools to you across the Internet by linking to the files held on their servers, just as you can with the other library components.

Several different configurations of the CSS Tools have also been put together, which combine some of the different tools into single files, making them easier and more efficient to use together. reset.css and fonts.css have been aggregated into one file for your convenience, which is probably because the YUI team recommend the use of these two tools in all YUI implementations. A reset-fonts-grids.css file has also been created due to the high likelihood that the huge range of page templates available in grids.css will also be used very frequently.

There is also a cheat sheet that combines information on all four of the CSS Tools. Reset, Fonts, and Base just need to be linked to the page to do its magic. Only the Grids Tool needs more coding from us.