Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export CSS on Chrome #93

Open
GoogleCodeExporter opened this issue Mar 16, 2015 · 2 comments
Open

Export CSS on Chrome #93

GoogleCodeExporter opened this issue Mar 16, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Visit spriteme.org
2. Get SpriteMe as bookmark to work (needed to clean up some characters in an 
editor, before I came up with a solution that was more straight-forward — to 
inspect element and copy link address and edit the bookmark content).
3. Get Firebug Lite working.
4. Start the demo.
5. Go through all steps.
6. Try to export CSS.

What is the expected output? What do you see instead?
Error in Firebug Lite: "Uncaught TypeError: Cannot read property 'length' of 
null (spriteme.js,695)"

What version of the product are you using? On what operating system?
Mac OS X 10.6.8
Chrome 15.0.874.24 beta

Please provide any additional information below.
686.            var aRules = [];
687.            try {
688.                aRules = ( SpriteMe.bIE ? stylesheet.rules : stylesheet.cssRules );
689.            }
690.            catch(err) {
691.                hRestrictedStylesheets[url] = true;
692.            }
693. 
694.            // Loop through each rule
695.            for ( var r = 0, nRules = aRules.length; r < nRules; r++ ) {

Obviously there is something about line 688 causing the null-object — but I 
leave it up to you guys to figure out a solution that suits best...

Maybe skip SpriteMe.bIE and write:
aRules = ( stylesheet.cssRules? stylesheet.rules : stylesheet.cssRules );

As suggested here: (http://www.javascriptkit.com/dhtmltutors/externalcss3.shtml)
var firstrule=mysheet.cssRules? mysheet.cssRules[0]: mysheet.rules[0]

Original issue reported on code.google.com by jonas.ca...@gmail.com on 28 Sep 2011 at 8:50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant