yostudios / Spritemapper

CSS Spritemap Generator
http://yostudios.github.com/Spritemapper/
MIT License
595 stars 42 forks source link

Single-line declarations fail #8

Open wiremine opened 13 years ago

wiremine commented 13 years ago

The parser seems to bail on single-line declarations

This causes a problem: body { line-height: 1 }

While this is valid: body { line-height: 1; }

lericson commented 13 years ago

This is invalid CSS syntax.

wiremine commented 13 years ago

You might want to double-check that: the above CSS validates as correct. If nothing else, you might want to document that your parser is stricter than the W3C's validator.

lericson commented 13 years ago

I did check afterwards, sorry! I might've been a little too quick. It's possible to emit a Declaration event in spritecss.css.parser on line 489 (presently there is a raise there explicitly for this case; it complicates the parser a lot.)