[TxMt] css language definition update

Matthew Johnson musical.matthew at mac.com
Thu Jul 27 17:07:53 UTC 2006


> It's certainly not something I'd advise; dynamic CSS is a path fraught
> with danger, and I'd like CSS to be kept unsullied...
>>
>> However, I do not think CSS should color embedded Ruby code by
>> default. Is that used a lot?

I'm not planning to use it dynamically, rather I plan to use it  
statically to generate a css file.  I want to use erb so I can embed  
variables in the css file, etc.  I actually have a template for  
a .css.rb file that embeds the css in a here doc which can now have  
embedded erb using my addition to the css bundle (the Ruby bundle  
already allows css embedding).  I then load the here doc into erb and  
generate a .css file with the same name next to the .css.rb file when  
the file is executed.  It's a pretty neat way to be able to use  
variables and simple expressions (for colors, height / width, etc) in  
a css file.

A bundle with a template and some commands, etc for working with  
a .css.rb file would be pretty easy to create once the css bundle  
supports Ruby embedding.

Matthew




More information about the textmate mailing list