Monday, November 14, 2005

cssampler: inspect your style sheets

Here is a php script that will show you examples of every style of a given stylesheet. You can demo it here. You can use any url of a stylesheet as seen in this example here. You can also use any text you want to. Download here.

Basically it works by flattening your stylesheet into classes and creates an inline style sheet. This lets you demo contextual styles as well. It compresses contextual styles to be separated by '_' instead of a space.

Limitations: Currently it does not use the "import" statement or any other css statement besides .class, #id, or regular html tags (e.g. h1, h2 etc). It will only read the actual files. Also because each contextual style is compressed into a flat style you lose a bit of the cascading. That is a limitation that will probably be fixed in later releases.

If you use this on your project drop me a line. I'd be interested to know if anyone finds it useful.

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home





 





Powered by Blogger

www.flickr.com
This is a Flickr badge showing photos in a set called nate as a kid (favorites). Make your own badge here.