Hi Ryan, The Sass parser first constructs an abstract syntax tree and then converts it to css. This syntax tree can be used for other tasks like extracting mixin definitions and inspecting them.
If you want to blaze a path, I'm eager to see where it goes. I should also point out that we've thought about creating a documentation tool for sass that would parse the sass files and emit documentation of mixins. Conceivably this could be built on the same underlying infrastructure. If you have patches for Sass to make it easier to get access to the AST and walk it in new ways, we'll consider them. However, they may have to wait until after the next major release for inclusion. Chris On Thu, Feb 5, 2009 at 11:35 AM, Ryan Thompson <[email protected]> wrote: > > Probably should have just posted this to haml group but I'm open to > suggestions from anywhere :-) > > thx > > On Feb 5, 11:13 am, Ryan Thompson <[email protected]> wrote: > > Hi All, > > > > I have several sass mixin definitions that define the parameters for > > some images that are generated using rake + rmagick. > > > > Currently, I'm just manually extracting this information and passing it > > to the rake task to build my images (gradients). > > > > My goal is to extract this information from the sass mixin deinfitions > > from a custom Rake task and use the extracted details to > > generate the gradient image overlay for the mixin. > > > > Rather than a grep-like approach I'd prefer to use the Sass code to get > > this information. > > > > What would be the best way to approach this? > > > > Cheers, > > > > Ryan > > > > rrthompson.vcf > > < 1KViewDownload > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/haml?hl=en -~----------~----~----~----~------~----~------~--~---
