visionmedia/css-parse — pull request #17 by philipwalton (2013-03-24 01:34:09+00:00)
Title: Add support for @page at-rules with nested @margin at-rules.

Reference:
http://dev.w3.org/csswg/css3-page/

I've added code to support `@page` rules with nested margin at-rules such as:

```
@page toc, index:blank {
color: green;
@top-left {
content: "foo";
color: blue;
}
@top-right {
content: "bar";
}
}
```

I had to slightly break out of the convention you've established and add a `type` property to these rules otherwise it can be ambiguous.

With other @rules you've used the type as an object's key, .e.g `{meda: "screen"}`, but that doesn't work with @page rules, so I explicitly report a type property.

Perhaps it's worth considering adding the type property to all @rule blocks. As the spec grows and more @rules are introduced, it might make it easier to handle.

I'd be happy to submit another pull request with this addition if you'd like.