Announcing Switch, the CSS Preprocessor!

Dave davidworley at gmail.com
Wed Aug 9 14:55:49 EDT 2006


Powered by Mod_Python, Switch CSS is a full featured, production ready
CSS preprocessor.

Some of the features include:
- variables
- constants
- selector prepending:

#selector {

        .class { property: value; }

}

outputs:

#selector { }
#selector .class { property: value; }

With unlimited levels of nesting, this makes CSS easy to read and fast
to write.

- selector copying:

#selector { width: 200px; }

#other_selector { @copy #selector; }

outputs:

#selector { width: 200px; }

#other_selector { width: 200px; }

- selector inheritance:

#selector { width: 200px; }

#other_selector { @inherit #selector; }

outputs:

#other_selector,
#selector { width: 200px; }

#other_selector {  }

There are other features, also. I think that's enough to get people
excited.

Switch was designed as a production-ready tool to solve the problem of
front-end design with CSS based-layouts and large CSS files. As we
realized we had 40,000 lines of CSS written and no means of abstracting
or managing the code easily, we decided to write a preprocessor that
was easy to use and had all the bells and whistles a CSS designer could
ever want.

We originally approached the program using PHP. When it took the PHP
version 30 seconds to process one CSS file, we knew PHP wasn't going to
cut it. By re-implementing the appication in Python - using a literal,
1-1 translation of the PHP version, under mod_python, Switch was able
to process the same file in under 1/4 of a second.

YAY! PYTHON!

The sourceforge project link follows. We could really use some tire
kickers... This group was invaluable in the early development process,
so we're announcing it officially here, and on mod_python first.

https://sourceforge.net/projects/switchcss/

Thanks,
Dave Worley




More information about the Python-list mailing list