<div dir="ltr"><br><br><div class="gmail_quote">On Fri, Aug 6, 2010 at 12:28 PM, Benedict Eastaugh <span dir="ltr"><<a href="mailto:ionfish@gmail.com">ionfish@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 6 August 2010 09:19, Michael Snoyman <<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>> wrote:<br>
<br>
> After looking into sass a little bit, I've decided I like it ;). I see the<br>
> following benefits of implementing something sass-like in Haskell via<br>
> quasi-quotation:<br>
><br>
> * Compile-time guarantee of well-formedness.<br>
> * The speed benefits of blaze-builder. Of course, this will still be slower<br>
> than serving a static file.<br>
> * Ability to use the same Haskell variables for both Hamlet and CSS.<br>
><br>
> I've started a new repo on Github[1]; I'm tentatively calling the project<br>
> "stylish".<br>
<br>
</div>This sounds pretty interesting. I wrote a Ruby tool called Stylish [1]<br>
a couple of years ago to solve a similar set of problems, and have<br>
occasionally wondered about rewriting it in Haskell. I look forward to<br>
seeing what you come up with.<br>
<br>
One potentially useful feature is generating code that requires<br>
browser prefixes (-webkit-border-radius etc.). There's also potential<br>
for generating minified versions of the code, concatenating multiple<br>
stylesheets etc.—it's a lot easier to do this stuff if you can<br>
programmatically manipulate the stylesheet at run-time. Embedding<br>
assets (graphics) as data URIs is another thing; have a look at how<br>
something like Jammit [3] does this.<br>
<br></blockquote><div>As far as the border-radius kind of stuff: the approach I'm taking to mixins should make it possible to write a plain old Haskell function to output multiple border-radius statements. I might even include such a mixin in the main package.</div>
<div><br></div><div>Regarding concatenating stylesheets: I believe that would have to be handled at the level *above* Stylish; Yesod, for example, automatically concatenates all style statements added via the addStyle function.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
There's also a Firefox and Thunderbird extension [2] called Stylish.<br>
Obviously you're free to call your project whatever you wish; I just<br>
thought I should let you know.<br>
<br></blockquote><div>I'm open to naming suggestions. Here's a few other ideas I'd had:</div><div><br></div><div>* sasslet: I don't really like too much, but makes clear the connection to Hamlet and Sass.</div>
<div>* csser/cssar: pronounced "Caesar," might give Shakespeare fans something to chuckle at.</div><div><br></div><div>As it stands, I'm leaning fairly strongly towards including Stylish in the Hamlet package.</div>
<div><br></div><div>Michael</div></div></div>