Announcing Switch, the CSS Preprocessor!

Dave davidworley at gmail.com
Wed Aug 9 15:47:25 EDT 2006


It's not tied deeply to mod_python.

The processor works like this:

You create an "sss" file, using Switch specific features. Then, you
place the file under Apache/mod_python OR you can use the command-line
Switch tool to process the SSS file and output a CSS file. In this way,
it works very similar to an XSLT transformation in that you write using
a shorthand method that outputs to a more verbose, crystallized file.

This way, it's platform agnostic. I'm also kicking around the idea of a
GUI tool.

The reason we didn't give it the ability to "preprocess if changed" is
because we're looking forward to implementing a system that can handle
conditional statements:

if $BROWSER is IE and $BROWSER_VERSION > 6 {

/* output this */

} else {

/* output this */

}

This would need to be compiled with every request. Maybe, though, we
could have different settings in which you could compile with every
request, compile on change, or precompile...

Actually, it's an open source program. Hack away!

Sybren Stuvel wrote:
> Dave enlightened us with:
> > Powered by Mod_Python, Switch CSS is a full featured, production
> > ready CSS preprocessor.
>
> It sounds very nice! Really something I could use!
>
> In how far is it coupled with mod_python? I'd rather not re-preprocess
> my CSS on every request. IMO it would be nice if the preprocess step
> could be done only if the source CSS changes.  But hey, maybe you've
> already done that.
>
> Does it integrate or live next to Django well?
>
> Sybren
> --
> The problem with the world is stupidity. Not saying there should be a
> capital punishment for stupidity, but why don't we just take the
> safety labels off of everything and let the problem solve itself?
>                                              Frank Zappa




More information about the Python-list mailing list