Jacob Fogg![]()
This module is simply designed to add a few classes to the HTML element on your page. This allows you to create some limited environment specific CSS styles in a very easy way.
This module should not be used as a crutch for lazy/poor CSS design, but rather an easy way to deal with browser specific bugs, like Chrome's current line-height bug.
Simply adding "gallery-ua-extra" to your YUI use statement will add the CSS classes to represent your operating system (e.g. mac, win, etc.), browser renderer (e.g. trident, gecko, webkit, or presto), browser (e.g. Chrome, FireFox, IE, etc.), and finally I add in "mobile" and "secure" where it applies. For the sake of consistency / ease of use, I add "renderer" and "browser" to Y.UA.
The idea and some of the code behind this module were borrow from AUI's base class.
Simply adding "gallery-ua-extra" to your YUI().use statement makes the CSS classes available for your use.
<script src="http://yui.yahooapis.com/3.1.2/build/yui/yui-min.js"></script><strong>Current HTML element classes are:</STRONG>
<span id="HTMLClasses"></span>
<script>
YUI({
//Last Gallery Build of this module
gallery: 'gallery-2010.08.25-19-45'
}).use('gallery-ua-extra', function(Y) {
/*
* By simply adding "gallery-ua-extra " to your use statement,
* the CSS classes have already been applied!
*
*/
Y.one('#HTMLClasses').set('text',Y.one('HTML').get('className'));
});
</script>No forum posts for this module.
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info