Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git] / src / util / CSS.js
index 9e53163..5284982 100644 (file)
@@ -1,3 +1,17 @@
+/*
+
+This file is part of Ext JS 4
+
+Copyright (c) 2011 Sencha Inc
+
+Contact:  http://www.sencha.com/contact
+
+GNU General Public License Usage
+This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file.  Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+
+If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
+
+*/
 /**
  * @class Ext.util.CSS
  * Utility class for manipulating CSS rules
@@ -18,13 +32,13 @@ Ext.define('Ext.util.CSS', function() {
             this.rules = {};
             this.initialized = false;
         },
+
         /**
          * Creates a stylesheet from a text blob of rules.
          * These rules will be wrapped in a STYLE tag and appended to the HEAD of the document.
          * @param {String} cssText The text containing the css rules
          * @param {String} id An id to add to the stylesheet for later removal
-         * @return {StyleSheet}
+         * @return {CSSStyleSheet}
          */
         createStyleSheet : function(cssText, id) {
             var ss,
@@ -103,7 +117,7 @@ Ext.define('Ext.util.CSS', function() {
                 for (; i >= 0; --i) {
                     selectorText = ssRules[i].selectorText;
                     if (selectorText) {
+
                         // Split in case there are multiple, comma-delimited selectors
                         selectorText = selectorText.split(',');
                         selectors = selectorText.length;
@@ -132,7 +146,7 @@ Ext.define('Ext.util.CSS', function() {
                         if (!ds[i].disabled) {
                             this.cacheStyleSheet(ds[i]);
                         }
-                    } catch(e) {} 
+                    } catch(e) {}
                 }
             }
             return rules;
@@ -140,9 +154,9 @@ Ext.define('Ext.util.CSS', function() {
 
         /**
          * Gets an an individual CSS rule by selector(s)
-         * @param {String/Array} selector The CSS selector or an array of selectors to try. The first selector that is found is returned.
+         * @param {String/String[]} selector The CSS selector or an array of selectors to try. The first selector that is found is returned.
          * @param {Boolean} refreshCache true to refresh the internal cache if you have recently updated any rules or added styles dynamically
-         * @return {CSSRule} The CSS rule or null if one is not found
+         * @return {CSSStyleRule} The CSS rule or null if one is not found
          */
         getRule: function(selector, refreshCache) {
             var rs = this.getRules(refreshCache);
@@ -159,7 +173,7 @@ Ext.define('Ext.util.CSS', function() {
 
         /**
          * Updates a rule property
-         * @param {String/Array} selector If it's an array it tries each selector until it finds one. Stops immediately once one is found.
+         * @param {String/String[]} selector If it's an array it tries each selector until it finds one. Stops immediately once one is found.
          * @param {String} property The css property
          * @param {String} value The new value for the property
          * @return {Boolean} true If a rule was found and updated
@@ -181,4 +195,4 @@ Ext.define('Ext.util.CSS', function() {
             return false;
         }
     };
-}());
\ No newline at end of file
+}());