Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
YUI.add('stylesheet', function (Y, NAME) {
2
 
3
/**
4
 * The StyleSheet component is a module for creating and modifying CSS
5
 * stylesheets.
6
 *
7
 * @module stylesheet
8
 */
9
var d      = Y.config.doc,
10
    p      = d.createElement('p'), // Have to hold the node (see notes)
11
    workerStyle = p.style, // worker style collection
12
    isString = Y.Lang.isString,
13
    selectors = {},
14
    sheets = {},
15
    floatAttr = ('cssFloat' in workerStyle) ? 'cssFloat' : 'styleFloat',
16
    _toCssText,
17
    _unsetOpacity,
18
    _unsetProperty,
19
    OPACITY = 'opacity',
20
    FLOAT   = 'float',
21
    EMPTY   = '';
22
 
23
// Normalizes the removal of an assigned style for opacity.  IE uses the filter
24
// property.
25
_unsetOpacity = (OPACITY in workerStyle) ?
26
    function (style) { style.opacity = EMPTY; } :
27
    function (style) { style.filter = EMPTY; };
28
 
29
// Normalizes the removal of an assigned style for a given property.  Expands
30
// shortcut properties if necessary and handles the various names for the float
31
// property.
32
workerStyle.border = "1px solid red";
33
workerStyle.border = EMPTY; // IE doesn't unset child properties
34
_unsetProperty = workerStyle.borderLeft ?
35
    function (style,prop) {
36
        var p;
37
        if (prop !== floatAttr && prop.toLowerCase().indexOf(FLOAT) != -1) {
38
            prop = floatAttr;
39
        }
40
        if (isString(style[prop])) {
41
            switch (prop) {
42
                case OPACITY:
43
                case 'filter' : _unsetOpacity(style); break;
44
                case 'font'   :
45
                    style.font       = style.fontStyle = style.fontVariant =
46
                    style.fontWeight = style.fontSize  = style.lineHeight  =
47
                    style.fontFamily = EMPTY;
48
                    break;
49
                default       :
50
                    for (p in style) {
51
                        if (p.indexOf(prop) === 0) {
52
                            style[p] = EMPTY;
53
                        }
54
                    }
55
            }
56
        }
57
    } :
58
    function (style,prop) {
59
        if (prop !== floatAttr && prop.toLowerCase().indexOf(FLOAT) != -1) {
60
            prop = floatAttr;
61
        }
62
        if (isString(style[prop])) {
63
            if (prop === OPACITY) {
64
                _unsetOpacity(style);
65
            } else {
66
                style[prop] = EMPTY;
67
            }
68
        }
69
    };
70
 
71
/**
72
 * Create an instance of StyleSheet to encapsulate a css stylesheet.
73
 * The constructor can be called using function or constructor syntax.
74
 * <pre><code>var sheet = Y.StyleSheet(..);</pre></code>
75
 * or
76
 * <pre><code>var sheet = new Y.StyleSheet(..);</pre></code>
77
 *
78
 * The first parameter passed can be any of the following things:
79
 * <ul>
80
 *   <li>The desired string name to register a new empty sheet</li>
81
 *   <li>The string name of an existing StyleSheet instance</li>
82
 *   <li>The unique guid generated for an existing StyleSheet instance</li>
83
 *   <li>The id of an existing <code>&lt;link&gt;</code> or <code>&lt;style&gt;</code> node</li>
84
 *   <li>The node reference for an existing <code>&lt;link&gt;</code> or <code>&lt;style&gt;</code> node</li>
85
 *   <li>The Y.Node instance wrapping an existing <code>&lt;link&gt;</code> or <code>&lt;style&gt;</code> node</li>
86
 *   <li>A chunk of css text to create a new stylesheet from</li>
87
 * </ul>
88
 *
89
 * <p>If a string is passed, StyleSheet will first look in its static name
90
 * registry for an existing sheet, then in the DOM for an element with that id.
91
 * If neither are found and the string contains the { character, it will be
92
 * used as a the initial cssText for a new StyleSheet.  Otherwise, a new empty
93
 * StyleSheet is created, assigned the string value as a name, and registered
94
 * statically by that name.</p>
95
 *
96
 * <p>The optional second parameter is a string name to register the sheet as.
97
 * This param is largely useful when providing a node id/ref or chunk of css
98
 * text to create a populated instance.</p>
99
 *
100
 * @class StyleSheet
101
 * @constructor
102
 * @param seed {String|HTMLElement|Node} a style or link node, its id, or a
103
 *              name or guid of a StyleSheet, or a string of css text
104
 * @param name {String} (optional) name to register instance for future static
105
 *              access
106
 */
107
function StyleSheet(seed, name) {
108
    var head,
109
        node,
110
        sheet,
111
        cssRules = {},
112
        _rules,
113
        _insertRule,
114
        _deleteRule,
115
        i,r,sel;
116
 
117
    // Factory or constructor
118
    if (!(Y.instanceOf(this, StyleSheet))) {
119
        return new StyleSheet(seed,name);
120
    }
121
 
122
    // Extract the DOM node from Node instances
123
    if (seed) {
124
        if (Y.Node && seed instanceof Y.Node) {
125
            node = seed._node;
126
        } else if (seed.nodeName) {
127
            node = seed;
128
        // capture the DOM node if the string is an id
129
        } else if (isString(seed)) {
130
            if (seed && sheets[seed]) {
131
                return sheets[seed];
132
            }
133
            node = d.getElementById(seed.replace(/^#/,EMPTY));
134
        }
135
 
136
        // Check for the StyleSheet in the static registry
137
        if (node && sheets[Y.stamp(node)]) {
138
            return sheets[Y.stamp(node)];
139
        }
140
    }
141
 
142
 
143
    // Create a style node if necessary
144
    if (!node || !/^(?:style|link)$/i.test(node.nodeName)) {
145
        node = d.createElement('style');
146
        node.type = 'text/css';
147
    }
148
 
149
    if (isString(seed)) {
150
        // Create entire sheet from seed cssText
151
        if (seed.indexOf('{') != -1) {
152
            // Not a load-time fork because low run-time impact and IE fails
153
            // test for s.styleSheet at page load time (oddly)
154
            if (node.styleSheet) {
155
                node.styleSheet.cssText = seed;
156
            } else {
157
                node.appendChild(d.createTextNode(seed));
158
            }
159
        } else if (!name) {
160
            name = seed;
161
        }
162
    }
163
 
164
    // Make sure the node is attached to the appropriate head element
165
    if (!node.parentNode || node.parentNode.nodeName.toLowerCase() !== 'head') {
166
        head = (node.ownerDocument || d).getElementsByTagName('head')[0];
167
        // styleSheet isn't available on the style node in FF2 until appended
168
        // to the head element.  style nodes appended to body do not affect
169
        // change in Safari.
170
        head.appendChild(node);
171
    }
172
 
173
    // Begin setting up private aliases to the important moving parts
174
    // 1. The stylesheet object
175
    // IE stores StyleSheet under the "styleSheet" property
176
    // Safari doesn't populate sheet for xdomain link elements
177
    sheet = node.sheet || node.styleSheet;
178
 
179
    // 2. The style rules collection
180
    // IE stores the rules collection under the "rules" property
181
    _rules = sheet && ('cssRules' in sheet) ? 'cssRules' : 'rules';
182
 
183
    // 3. The method to remove a rule from the stylesheet
184
    // IE supports removeRule
185
    _deleteRule = ('deleteRule' in sheet) ?
186
        function (i) { sheet.deleteRule(i); } :
187
        function (i) { sheet.removeRule(i); };
188
 
189
    // 4. The method to add a new rule to the stylesheet
190
    // IE supports addRule with different signature
191
    _insertRule = ('insertRule' in sheet) ?
192
        function (sel,css,i) { sheet.insertRule(sel+' {'+css+'}',i); } :
193
        function (sel,css,i) { sheet.addRule(sel,css,i); };
194
 
195
    // 5. Initialize the cssRules map from the node
196
    // xdomain link nodes forbid access to the cssRules collection, so this
197
    // will throw an error.
198
    // TODO: research alternate stylesheet, @media
199
    for (i = sheet[_rules].length - 1; i >= 0; --i) {
200
        r   = sheet[_rules][i];
201
        sel = r.selectorText;
202
 
203
        if (cssRules[sel]) {
204
            cssRules[sel].style.cssText += ';' + r.style.cssText;
205
            _deleteRule(i);
206
        } else {
207
            cssRules[sel] = r;
208
        }
209
    }
210
 
211
    // Cache the instance by the generated Id
212
    StyleSheet.register(Y.stamp(node),this);
213
 
214
    // Register the instance by name if provided or defaulted from seed
215
    if (name) {
216
        StyleSheet.register(name,this);
217
    }
218
 
219
    // Public API
220
    Y.mix(this,{
221
        /**
222
         * Get the unique stamp for this StyleSheet instance
223
         *
224
         * @method getId
225
         * @return {Number} the static id
226
         */
227
        getId : function () { return Y.stamp(node); },
228
 
229
        /**
230
         * Enable all the rules in the sheet
231
         *
232
         * @method enable
233
         * @return {StyleSheet}
234
         * @chainable
235
         */
236
        enable : function () { sheet.disabled = false; return this; },
237
 
238
        /**
239
         * Disable all the rules in the sheet.  Rules may be changed while the
240
         * StyleSheet is disabled.
241
         *
242
         * @method disable
243
         * @return {StyleSheet}
244
         * @chainable
245
         */
246
        disable : function () { sheet.disabled = true; return this; },
247
 
248
        /**
249
         * Returns false if the StyleSheet is disabled.  Otherwise true.
250
         *
251
         * @method isEnabled
252
         * @return {Boolean}
253
         */
254
        isEnabled : function () { return !sheet.disabled; },
255
 
256
        /**
257
         * <p>Set style properties for a provided selector string.
258
         * If the selector includes commas, it will be split into individual
259
         * selectors and applied accordingly.  If the selector string does not
260
         * have a corresponding rule in the sheet, it will be added.</p>
261
         *
262
         * <p>The object properties in the second parameter must be the JavaScript
263
         * names of style properties.  E.g. fontSize rather than font-size.</p>
264
         *
265
         * <p>The float style property will be set by any of &quot;float&quot;,
266
         * &quot;styleFloat&quot;, or &quot;cssFloat&quot;.</p>
267
         *
268
         * @method set
269
         * @param sel {String} the selector string to apply the changes to
270
         * @param css {Object} Object literal of style properties and new values
271
         * @return {StyleSheet}
272
         * @chainable
273
         */
274
        set : function (sel,css) {
275
            var rule = cssRules[sel],
276
                multi = sel.split(/\s*,\s*/),i,
277
                idx;
278
 
279
            // IE's addRule doesn't support multiple comma delimited selectors
280
            if (multi.length > 1) {
281
                for (i = multi.length - 1; i >= 0; --i) {
282
                    this.set(multi[i], css);
283
                }
284
                return this;
285
            }
286
 
287
            // Some selector values can cause IE to hang
288
            if (!StyleSheet.isValidSelector(sel)) {
289
                return this;
290
            }
291
 
292
            // Opera throws an error if there's a syntax error in assigned
293
            // cssText. Avoid this using a worker style collection, then
294
            // assigning the resulting cssText.
295
            if (rule) {
296
                rule.style.cssText = StyleSheet.toCssText(css,rule.style.cssText);
297
            } else {
298
                idx = sheet[_rules].length;
299
                css = StyleSheet.toCssText(css);
300
 
301
                // IE throws an error when attempting to addRule(sel,'',n)
302
                // which would crop up if no, or only invalid values are used
303
                if (css) {
304
                    _insertRule(sel, css, idx);
305
 
306
                    // Safari replaces the rules collection, but maintains the
307
                    // rule instances in the new collection when rules are
308
                    // added/removed
309
                    cssRules[sel] = sheet[_rules][idx];
310
                }
311
            }
312
            return this;
313
        },
314
 
315
        /**
316
         * <p>Unset style properties for a provided selector string, removing
317
         * their effect from the style cascade.</p>
318
         *
319
         * <p>If the selector includes commas, it will be split into individual
320
         * selectors and applied accordingly.  If there are no properties
321
         * remaining in the rule after unsetting, the rule is removed.</p>
322
         *
323
         * <p>The style property or properties in the second parameter must be the
324
         * JavaScript style property names. E.g. fontSize rather than font-size.</p>
325
         *
326
         * <p>The float style property will be unset by any of &quot;float&quot;,
327
         * &quot;styleFloat&quot;, or &quot;cssFloat&quot;.</p>
328
         *
329
         * @method unset
330
         * @param sel {String} the selector string to apply the changes to
331
         * @param css {String|Array} style property name or Array of names
332
         * @return {StyleSheet}
333
         * @chainable
334
         */
335
        unset : function (sel,css) {
336
            var rule = cssRules[sel],
337
                multi = sel.split(/\s*,\s*/),
338
                remove = !css,
339
                rules, i;
340
 
341
            // IE's addRule doesn't support multiple comma delimited selectors
342
            // so rules are mapped internally by atomic selectors
343
            if (multi.length > 1) {
344
                for (i = multi.length - 1; i >= 0; --i) {
345
                    this.unset(multi[i], css);
346
                }
347
                return this;
348
            }
349
 
350
            if (rule) {
351
                if (!remove) {
352
                    css = Y.Array(css);
353
 
354
                    workerStyle.cssText = rule.style.cssText;
355
                    for (i = css.length - 1; i >= 0; --i) {
356
                        _unsetProperty(workerStyle,css[i]);
357
                    }
358
 
359
                    if (workerStyle.cssText) {
360
                        rule.style.cssText = workerStyle.cssText;
361
                    } else {
362
                        remove = true;
363
                    }
364
                }
365
 
366
                if (remove) { // remove the rule altogether
367
                    rules = sheet[_rules];
368
                    for (i = rules.length - 1; i >= 0; --i) {
369
                        if (rules[i] === rule) {
370
                            delete cssRules[sel];
371
                            _deleteRule(i);
372
                            break;
373
                        }
374
                    }
375
                }
376
            }
377
            return this;
378
        },
379
 
380
        /**
381
         * Get the current cssText for a rule or the entire sheet.  If the
382
         * selector param is supplied, only the cssText for that rule will be
383
         * returned, if found.  If the selector string targets multiple
384
         * selectors separated by commas, the cssText of the first rule only
385
         * will be returned.  If no selector string, the stylesheet's full
386
         * cssText will be returned.
387
         *
388
         * @method getCssText
389
         * @param sel {String} Selector string
390
         * @return {String}
391
         */
392
        getCssText : function (sel) {
393
            var rule, css, selector;
394
 
395
            if (isString(sel)) {
396
                // IE's addRule doesn't support multiple comma delimited
397
                // selectors so rules are mapped internally by atomic selectors
398
                rule = cssRules[sel.split(/\s*,\s*/)[0]];
399
 
400
                return rule ? rule.style.cssText : null;
401
            } else {
402
                css = [];
403
                for (selector in cssRules) {
404
                    if (cssRules.hasOwnProperty(selector)) {
405
                        rule = cssRules[selector];
406
                        css.push(rule.selectorText+" {"+rule.style.cssText+"}");
407
                    }
408
                }
409
                return css.join("\n");
410
            }
411
        }
412
    });
413
 
414
}
415
 
416
_toCssText = function (css,base) {
417
    var f    = css.styleFloat || css.cssFloat || css[FLOAT],
418
        trim = Y.Lang.trim,
419
        prop;
420
 
421
    // A very difficult to repro/isolate IE 9 beta (and Platform Preview 7) bug
422
    // was reduced to this line throwing the error:
423
    // "Invalid this pointer used as target for method call"
424
    // It appears that the style collection is corrupted. The error is
425
    // catchable, so in a best effort to work around it, replace the
426
    // p and workerStyle and try the assignment again.
427
    try {
428
        workerStyle.cssText = base || EMPTY;
429
    } catch (e) {
430
        p = d.createElement('p');
431
        workerStyle = p.style;
432
        workerStyle.cssText = base || EMPTY;
433
    }
434
 
435
    if (f && !css[floatAttr]) {
436
        css = Y.merge(css);
437
        delete css.styleFloat; delete css.cssFloat; delete css[FLOAT];
438
        css[floatAttr] = f;
439
    }
440
 
441
    for (prop in css) {
442
        if (css.hasOwnProperty(prop)) {
443
            try {
444
                // IE throws Invalid Value errors and doesn't like whitespace
445
                // in values ala ' red' or 'red '
446
                workerStyle[prop] = trim(css[prop]);
447
            }
448
            catch (ex) {
449
            }
450
        }
451
    }
452
    return workerStyle.cssText;
453
};
454
 
455
Y.mix(StyleSheet, {
456
    /**
457
     * <p>Converts an object literal of style properties and values into a string
458
     * of css text.  This can then be assigned to el.style.cssText.</p>
459
     *
460
     * <p>The optional second parameter is a cssText string representing the
461
     * starting state of the style prior to alterations.  This is most often
462
     * extracted from the eventual target's current el.style.cssText.</p>
463
     *
464
     * @method toCssText
465
     * @param css {Object} object literal of style properties and values
466
     * @param cssText {String} (optional) starting cssText value
467
     * @return {String} the resulting cssText string
468
     * @static
469
     */
470
    toCssText : ((OPACITY in workerStyle) ? _toCssText :
471
        // Wrap IE's toCssText to catch opacity.  The copy/merge is to preserve
472
        // the input object's integrity, but if float and opacity are set, the
473
        // input will be copied twice in IE.  Is there a way to avoid this
474
        // without increasing the byte count?
475
        function (css, cssText) {
476
            if (OPACITY in css) {
477
                css = Y.merge(css,{
478
                        filter: 'alpha(opacity='+(css.opacity*100)+')'
479
                      });
480
                delete css.opacity;
481
            }
482
            return _toCssText(css,cssText);
483
        }),
484
 
485
    /**
486
     * Registers a StyleSheet instance in the static registry by the given name
487
     *
488
     * @method register
489
     * @param name {String} the name to assign the StyleSheet in the registry
490
     * @param sheet {StyleSheet} The StyleSheet instance
491
     * @return {Boolean} false if no name or sheet is not a StyleSheet
492
     *              instance. true otherwise.
493
     * @static
494
     */
495
    register : function (name,sheet) {
496
        return !!(name && sheet instanceof StyleSheet &&
497
                  !sheets[name] && (sheets[name] = sheet));
498
    },
499
 
500
    /**
501
     * <p>Determines if a selector string is safe to use.  Used internally
502
     * in set to prevent IE from locking up when attempting to add a rule for a
503
     * &quot;bad selector&quot;.</p>
504
     *
505
     * <p>Bad selectors are considered to be any string containing unescaped
506
     * `~!@$%^&()+=|{}[];'"?< or space. Also forbidden are . or # followed by
507
     * anything other than an alphanumeric.  Additionally -abc or .-abc or
508
     * #_abc or '# ' all fail.  There are likely more failure cases, so
509
     * please file a bug if you encounter one.</p>
510
     *
511
     * @method isValidSelector
512
     * @param sel {String} the selector string
513
     * @return {Boolean}
514
     * @static
515
     */
516
    isValidSelector : function (sel) {
517
        var valid = false;
518
 
519
        if (sel && isString(sel)) {
520
 
521
            if (!selectors.hasOwnProperty(sel)) {
522
                // TEST: there should be nothing but white-space left after
523
                // these destructive regexs
524
                selectors[sel] = !/\S/.test(
525
                    // combinators
526
                    sel.replace(/\s+|\s*[+~>]\s*/g,' ').
527
                    // attribute selectors (contents not validated)
528
                    replace(/([^ ])\[.*?\]/g,'$1').
529
                    // pseudo-class|element selectors (contents of parens
530
                    // such as :nth-of-type(2) or :not(...) not validated)
531
                    replace(/([^ ])::?[a-z][a-z\-]+[a-z](?:\(.*?\))?/ig,'$1').
532
                    // element tags
533
                    replace(/(?:^| )[a-z0-6]+/ig,' ').
534
                    // escaped characters
535
                    replace(/\\./g,EMPTY).
536
                    // class and id identifiers
537
                    replace(/[.#]\w[\w\-]*/g,EMPTY));
538
            }
539
 
540
            valid = selectors[sel];
541
        }
542
 
543
        return valid;
544
    }
545
},true);
546
 
547
Y.StyleSheet = StyleSheet;
548
 
549
/*
550
 
551
NOTES
552
 * Style node must be added to the head element.  Safari does not honor styles
553
   applied to StyleSheet objects on style nodes in the body.
554
 * StyleSheet object is created on the style node when the style node is added
555
   to the head element in Firefox 2 (and maybe 3?)
556
 * The cssRules collection is replaced after insertRule/deleteRule calls in
557
   Safari 3.1.  Existing Rules are used in the new collection, so the collection
558
   cannot be cached, but the rules can be.
559
 * Opera requires that the index be passed with insertRule.
560
 * Same-domain restrictions prevent modifying StyleSheet objects attached to
561
   link elements with remote href (or "about:blank" or "javascript:false")
562
 * Same-domain restrictions prevent reading StyleSheet cssRules/rules
563
   collection of link elements with remote href (or "about:blank" or
564
   "javascript:false")
565
 * Same-domain restrictions result in Safari not populating node.sheet property
566
   for link elements with remote href (et.al)
567
 * IE names StyleSheet related properties and methods differently (see code)
568
 * IE converts tag names to upper case in the Rule's selectorText
569
 * IE converts empty string assignment to complex properties to value settings
570
   for all child properties.  E.g. style.background = '' sets non-'' values on
571
   style.backgroundPosition, style.backgroundColor, etc.  All else clear
572
   style.background and all child properties.
573
 * IE assignment style.filter = '' will result in style.cssText == 'FILTER:'
574
 * All browsers support Rule.style.cssText as a read/write property, leaving
575
   only opacity needing to be accounted for.
576
 * Benchmarks of style.property = value vs style.cssText += 'property: value'
577
   indicate cssText is slightly slower for single property assignment.  For
578
   multiple property assignment, cssText speed stays relatively the same where
579
   style.property speed decreases linearly by the number of properties set.
580
   Exception being Opera 9.27, where style.property is always faster than
581
   style.cssText.
582
 * Opera 9.5b throws a syntax error when assigning cssText with a syntax error.
583
 * Opera 9.5 doesn't honor rule.style.cssText = ''.  Previous style persists.
584
   You have to remove the rule altogether.
585
 * Stylesheet properties set with !important will trump inline style set on an
586
   element or in el.style.property.
587
 * Creating a worker style collection like document.createElement('p').style;
588
   will fail after a time in FF (~5secs of inactivity).  Property assignments
589
   will not alter the property or cssText.  It may be the generated node is
590
   garbage collected and the style collection becomes inert (speculation).
591
 * IE locks up when attempting to add a rule with a selector including at least
592
   characters {[]}~`!@%^&*()+=|? (unescaped) and leading _ or -
593
   such as addRule('-foo','{ color: red }') or addRule('._abc','{...}')
594
 * IE's addRule doesn't support comma separated selectors such as
595
   addRule('.foo, .bar','{..}')
596
 * IE throws an error on valid values with leading/trailing white space.
597
 * When creating an entire sheet at once, only FF2/3 & Opera allow creating a
598
   style node, setting its innerHTML and appending to head.
599
 * When creating an entire sheet at once, Safari requires the style node to be
600
   created with content in innerHTML of another element.
601
 * When creating an entire sheet at once, IE requires the style node content to
602
   be set via node.styleSheet.cssText
603
 * When creating an entire sheet at once in IE, styleSheet.cssText can't be
604
   written until node.type = 'text/css'; is performed.
605
 * When creating an entire sheet at once in IE, load-time fork on
606
   var styleNode = d.createElement('style'); _method = styleNode.styleSheet ?..
607
   fails (falsey).  During run-time, the test for .styleSheet works fine
608
 * Setting complex properties in cssText will SOMETIMES allow child properties
609
   to be unset
610
   set         unset              FF2  FF3  S3.1  IE6  IE7  Op9.27  Op9.5
611
   ----------  -----------------  ---  ---  ----  ---  ---  ------  -----
612
   border      -top               NO   NO   YES   YES  YES  YES     YES
613
               -top-color         NO   NO   YES             YES     YES
614
               -color             NO   NO   NO              NO      NO
615
   background  -color             NO   NO   YES             YES     YES
616
               -position          NO   NO   YES             YES     YES
617
               -position-x        NO   NO   NO              NO      NO
618
   font        line-height        YES  YES  NO    NO   NO   NO      YES
619
               -style             YES  YES  NO              YES     YES
620
               -size              YES  YES  NO              YES     YES
621
               -size-adjust       ???  ???  n/a   n/a  n/a  ???     ???
622
   padding     -top               NO   NO   YES             YES     YES
623
   margin      -top               NO   NO   YES             YES     YES
624
   list-style  -type              YES  YES  YES             YES     YES
625
               -position          YES  YES  YES             YES     YES
626
   overflow    -x                 NO   NO   YES             n/a     YES
627
 
628
   ??? - unsetting font-size-adjust has the same effect as unsetting font-size
629
 * FireFox and WebKit populate rule.cssText as "SELECTOR { CSSTEXT }", but
630
   Opera and IE do not.
631
 * IE6 and IE7 silently ignore the { and } if passed into addRule('.foo','{
632
   color:#000}',0).  IE8 does not and creates an empty rule.
633
 * IE6-8 addRule('.foo','',n) throws an error.  Must supply *some* cssText
634
*/
635
 
636
 
637
 
638
}, '3.18.1', {"requires": ["yui-base"]});