You can write a custom sass function in ruby to perform more complex  
computation when SassScript doesn't cut it.

See the sass docs for details:
http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html

If you're planning on distributing your framework, you can make it a  
compass extension, and that will make it easier to bundle and load  
your extension. Also, compass provides tons of great tools to make  
installing your framework a breeze.

Hunt & pecked on my iPhone... Sorry if it's brief!

On Jul 7, 2009, at 8:25 AM, The Wicked Flea <[email protected]>  
wrote:

>
> Hi y'all,
>
> As I mentioned the other day, I'm working on a framework for css grid
> frameworks.  One thing I noticed in my work is that the concatenation
> I needed to do wound up feeling hackish.
>
> What I'm doing is dynamically generating a grid given spacing, width,
> and a set number of columns.  So, I have to have an unknown number of
> ".grid-N" classes that all get assigned global settings (to save
> space).  Here's what I have to do right now.
>
>> !parts = ""
>> @for !i from 1 through (!columns - 1)
>>  !parts = "#{!parts}#{!container} .grid-#{!i}, "
>> #{!parts}#{!container} .grid-#{!columns}
>>  float:    left
>>  display:  inline
>>  margin-left=   !space
>>  margin-right=  !space
>
> Here's an idea, a generator for a group of elements given a format
> that operates like @for.  Such as:
>
>> @select-from "#{!container} .grid-#{!i}" where !i is 1 to (!columns  
>> - 1)
>
> I know it's lisp like, but no more so than @for is.  ;-)  I'd give a
> shot on putting it together, but I've never written a parser (or
> parser addition) in all my life.
>
> Cheers,
> Flea
> >


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to