<div dir="ltr"><br><br><div class="gmail_quote">On Fri, Aug 6, 2010 at 12:28 PM, Benedict Eastaugh <span dir="ltr">&lt;<a href="mailto:ionfish@gmail.com">ionfish@gmail.com</a>&gt;</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 &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt; wrote:<br>
<br>
&gt; After looking into sass a little bit, I&#39;ve decided I like it ;). I see the<br>
&gt; following benefits of implementing something sass-like in Haskell via<br>
&gt; quasi-quotation:<br>
&gt;<br>
&gt; * Compile-time guarantee of well-formedness.<br>
&gt; * The speed benefits of blaze-builder. Of course, this will still be slower<br>
&gt;   than serving a static file.<br>
&gt; * Ability to use the same Haskell variables for both Hamlet and CSS.<br>
&gt;<br>
&gt; I&#39;ve started a new repo on Github[1]; I&#39;m tentatively calling the project<br>
&gt; &quot;stylish&quot;.<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&#39;s also potential<br>
for generating minified versions of the code, concatenating multiple<br>
stylesheets etc.—it&#39;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&#39;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&#39;s also a Firefox and Thunderbird extension [2] called Stylish.<br>
Obviously you&#39;re free to call your project whatever you wish; I just<br>
thought I should let you know.<br>
<br></blockquote><div>I&#39;m open to naming suggestions. Here&#39;s a few other ideas I&#39;d had:</div><div><br></div><div>* sasslet: I don&#39;t really like too much, but makes clear the connection to Hamlet and Sass.</div>
<div>* csser/cssar: pronounced &quot;Caesar,&quot; might give Shakespeare fans something to chuckle at.</div><div><br></div><div>As it stands, I&#39;m leaning fairly strongly towards including Stylish in the Hamlet package.</div>
<div><br></div><div>Michael</div></div></div>