This project is archived and is in readonly mode.

#22 ✓wontfix
Thomas Aylott

Create a new style element with innerCSS error.

Reported by Thomas Aylott | May 28th, 2008 @ 10:00 AM | in 2.0 (closed)

Originally posted on Trac by DanielSteigerwald

Original Trac Ticket

Description

I wanted this:

var style = [
                '  *            { margin: 0; padding: 0; }',
                '  body, html   { width: 100%; height: 100%; overflow: hidden; font-size: 100%; font-family: \'Trebuchet MS\', \'Geneva CE\', lucida, sans-serif;}'
            ].join('');        
            
            var el = new Element('style', { 
                'type': 'text/css',
                'text': style
            }).inject(document.head); 

But IE6/7 throws a some exceptions.

This works:

var el = document.createElement('style');
            el.setAttribute('type','text/css');
            Browser.Engine.trident ? el.styleSheet.cssText = style : el.appendText(style);
            document.head.appendChild(el);

Trac Attachments

Trac Comments

Changed 7 months ago by kamicane



                  Changed 7 months ago by kamicane

          owner
              set to kamicane
        
          status
              changed from new to assigned

          owner
              set to kamicane
        
          status
              changed from new to assigned
        
      

Changed 7 months ago by kamicane


        
This should be considered enhancement. 

We will add support for stylesheets when we add a full Style class. 

                  Changed 7 months ago by kamicane

          type
              changed from defect to enhancement
        
          milestone
              changed from Mootools version 1.2 to Mootools version 1.3

This should be considered enhancement. 

We will add support for stylesheets when we add a full Style class. 

          type
              changed from defect to enhancement
        
          milestone
              changed from Mootools version 1.2 to Mootools version 1.3
        
      

Changed 2 weeks ago by tomocchino



                  Changed 2 weeks ago by tomocchino

          priority
              changed from trivial to minor
        
          milestone
              set to Mootools version 1.3

          priority
              changed from trivial to minor
        
          milestone
              set to Mootools version 1.3
        
      

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Referenced by

Pages