Crunch / postcss-less

MIT License
35 stars 9 forks source link

AtRule without body #3

Closed shellscape closed 8 years ago

shellscape commented 8 years ago

Requesting a small improvement to the AtRule type. When parsing @rule(); or @rule; it would be great to have a convenience property shared with regular Rule types; node.ruleWithoutBody. Presently we're having to frequently use:

(node.type === 'atrule' && (!node.nodes || (node.nodes && node.nodes.length === 0)))

which works, but it gets messy. Any chance of adding that property to AtRule nodes as well?

shellscape commented 8 years ago

Crap. I just commented on the wrong repo. Apologies!

matthew-dean commented 8 years ago

No problem! ^_^