Completely separate from the CSS Tools, but still composed entirely of CSS, the Sam skin provides a default theme for each of the library's controls. Each control contains a skin CSS file in its assets
folder and should be linked to using the standard <link>
tag in the <head>
of any pages on which the controls are displayed.
In order to use the skin files, as well as linking to the stylesheet used by the skin, you will also need to give the containing element (whether that is the <body>
or a <div>
) a special class name:
<body class="yui-skin-sam">
Or, for finer control:
<div class="yui-skin-sam">
<div id="someControl"></div>
</div>
This makes using the skin extremely easy. The Sam skin takes its name from its creator Sam Lind. At its launch, it was expected that developers would contribute further skins but that has not yet happened as each site develops the skins for the components it uses instead of a whole set for all...