[Haskell-cafe] Re: [web-devel] statically compiled css

Benedict Eastaugh ionfish at gmail.com
Fri Aug 6 05:28:52 EDT 2010


On 6 August 2010 09:19, Michael Snoyman <michael at snoyman.com> wrote:

> After looking into sass a little bit, I've decided I like it ;). I see the
> following benefits of implementing something sass-like in Haskell via
> quasi-quotation:
>
> * Compile-time guarantee of well-formedness.
> * The speed benefits of blaze-builder. Of course, this will still be slower
>   than serving a static file.
> * Ability to use the same Haskell variables for both Hamlet and CSS.
>
> I've started a new repo on Github[1]; I'm tentatively calling the project
> "stylish".

This sounds pretty interesting. I wrote a Ruby tool called Stylish [1]
a couple of years ago to solve a similar set of problems, and have
occasionally wondered about rewriting it in Haskell. I look forward to
seeing what you come up with.

One potentially useful feature is generating code that requires
browser prefixes (-webkit-border-radius etc.). There's also potential
for generating minified versions of the code, concatenating multiple
stylesheets etc.—it's a lot easier to do this stuff if you can
programmatically manipulate the stylesheet at run-time. Embedding
assets (graphics) as data URIs is another thing; have a look at how
something like Jammit [3] does this.

There's also a Firefox and Thunderbird extension [2] called Stylish.
Obviously you're free to call your project whatever you wish; I just
thought I should let you know.

Benedict.

[1] http://ionfish.github.com/stylish
[2] http://userstyles.org/stylish
[3] http://documentcloud.github.com/jammit/#embedding


More information about the Haskell-Cafe mailing list