You must have Javascript enabled to experience this site.

Respond.js stops on } in comments

Posted & filed under Coding Tips.

Respond.js is a lightweight polyfill for min/max-width CSS3 Media Queries for IE 6-8, however be careful with your comments.

I have been working with Responsive Web Design for some time now, which works great with all modern browsers, but IE is a problem (especially IE 6-8). This is where Respond.js comes in.

While debugging a seemingly baffling problem, I found this issue.

 

PaulShipley opened this issue 5 months ago

This is more a "Gottya" than a bug and I have not checked the code yet, but maybe this will save someone else some head scratching.

Issue was that Respond would stop parsing a style sheet before the end. After a bit of trial and error, problem was due to a comment in the form

/* blah blah blah } blah */

Removing the '}' fixed the problem.

Solution: Don't put '}' characters in comments.

 

https://github.com/scottjehl/Respond/issues/150

 

 

 

 

 

1 views