visionmedia/css-parse — pull request #15 by ForbesLindesay (2013-03-04 20:59:09+00:00)
Title: Parse Comments

This parses comments and they appear in the output as `{"comment": "comment test"}` e.g.:

```css
/* http://foo.com/bar/baz.html */

foo { /*/*/
bar: baz; /* http://foo.com/bar/baz.html */
}
```

becomes

```js
{
"stylesheet": {
"rules": [
{
"comment": " http://foo.com/bar/baz.html "
},
{
"selectors": [
"foo"
],
"declarations": [
{
"property": "bar",
"value": "baz"
}
]
}
]
}
}
```

Note that it ignores any comments that aren't either top-level or direct descendants of `@media` queries.

I'd add support for direct descendants of `@keyframes` but it would break https://github.com/visionmedia/rework/blob/master/lib/visit.js so that needs to be fixed to check `if (keyframe.declarations)` first.

Closes #13