[web-devel] Cascading/Scoping via indenting/whitespace in Cassius

Michael Snoyman michael at snoyman.com
Sun Apr 3 15:36:17 CEST 2011


There's a fairly rigorous test suite for the Hamlet package (including
Cassius and Lucius), so you can experiment with a high degree of certainty
that you aren't breaking anything. Also, most of the changes necessary for
the nesting feature should be able to avoid touching any Template Haskell
code. And finally, there will likely be some overlap between the code
necessary for Lucius and Cassius to implement nesting (such as the selector
parsing code).

So if you're interested in this, I would definitely recommend this as a good
project to take a crack at. You can always ask for help if you get stuck.

Michael

On Sun, Apr 3, 2011 at 2:20 PM, "Timo B. Hübel" <t.h at gmx.info> wrote:

> Hi,
>
> that is nice to hear, although I especially favor the brace-less syntax. I
> think I'll have a hard time to choose between those two. Unfortunately I
> have absolutely no clue about those parsing and template Haskell things, but
> maybe I'll give it a try on a boring evening.
>
> Thanks,
> Timo
>
>
> On 04/03/2011 01:12 PM, Michael Snoyman wrote:
>
>> Cassius actually supported this in the past. However, there are some
>> technical problems involving the syntax that led me to take it out.
>> However, this *is* a feature that's planned for Lucius, the
>> brace-syntax sibling of Cassius.
>>
>> I'm open to revisiting the issue on Cassius, especially if someone
>> submits a patch.
>>
>> Michael
>>
>> On Sun, Apr 3, 2011 at 1:59 PM, "Timo B. Hübel"<t.h at gmx.info>  wrote:
>>
>>> Hi,
>>>
>>> one of my most loved features in SASS is automatic scoping/cascading via
>>> indenting/significant whitespace.
>>>
>>> Consider the following SASS code:
>>>
>>> #header
>>>  p
>>>    color: red
>>>
>>> #content
>>>  p
>>>    color: blue
>>>
>>> Sass does automatically cascade the two p definitions in the resulting
>>> CSS:
>>>
>>> #header p { color: red; }
>>> #content p { color: blue; }
>>>
>>> Is this possible in Cassius? Or considered as feature for the future?
>>> IMHO
>>> does this feature lead to very concisely scoped CSS while removing the
>>> burden of specifying the cascades from the developer.
>>>
>>> Cheers,
>>> T.
>>>
>>> _______________________________________________
>>> web-devel mailing list
>>> web-devel at haskell.org
>>> http://www.haskell.org/mailman/listinfo/web-devel
>>>
>>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20110403/6732b6b1/attachment-0001.htm>


More information about the web-devel mailing list