tags:

views:

207

answers:

3

I've been working on a really large project for almost 2 years and the client requirements keep changing. These changes, of course, effect everything and I would like to find a way to work with the CSS in a more dynamic fashion.

I assume I could get one of the ruby or python CSS DSLs running under ironRuby/Python but this client is very very particular about what software/frameworks are installed.

I have not found a CSS DSL where the base programming language is vb or c#.

reference: http://sandbox.pocoo.org/clevercss/ and http://nubyonrails.com/articles/dynamic-css

+1  A: 

I am not sure about any publicly available products, but I have written an ASP.NET HttpHandler for .css files a few times. Its a pretty simple task, and I usually add things like variable and basic expression support, realtime minification, comment stripping, etc. Is this what your looking for? If so, I think each time its taken maybe 10 hours of work max to write, debug, and implement the handler...not too bad given all the benefits.

jrista
Indeed, I have implemented such more than once. CSS is just not that complicated.
Rex M
A: 

You could also write your own DSL, using either the DSL Toolkit that's part of the Visual Studio SDK, or using Oslo. In the former case, the result could be .css files plus whatever else you needed, including API code for your ASP.NET application to call upon.

John Saunders
Seems like that might be my best option right now. I was hoping to not have to roll my own..
Detroitpro
To roll your own, I'd at least start with the DSL Toolkit. The fact of a graphical DSL that can generate code or other text files (like .css files) may help you clarify your thinking on the nature of the required abstraction.
John Saunders
+2  A: 

Less CSS for .NET was recently released.

http://www.dotlesscss.com/

Detroitpro