Brail and Smart CSS
I just implemented a nice CSS view for the bug tracking sample I’m working on. The css file looks like this:
        <%         
        backGround = "#FDF6E9"
        textColor = "#333333"
        %>     
        body
        {
         background: ${backGround};
         color: ${textColor};
        }     
This is not a new idea, you can go to the original posting and see the idea in Ruby.
The implementation is a bit of a hack, I created a CssController with a single method, Css(). The pages are setup to request the css from "/css/css.aspx", which generate the correct CSS output and is easy to edit. Frankly, I'm amazed that this isn't in the CSS spec already, this is the #1 problem when editing CSS today.
As a note, It's using "aspx" extention since I'm going to put this on a shared hosting, so this assumes that I can't change IIS's definations. If you control your server, you can use "bcss" extention, which is more descriptive.
 

Comments
Comment preview