Cascading/Scoping via indenting/whitespace in Cassius

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.

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"
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@haskell.org http://www.haskell.org/mailman/listinfo/web-devel

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"
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@haskell.org http://www.haskell.org/mailman/listinfo/web-devel

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"
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"
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@haskell.org http://www.haskell.org/mailman/listinfo/web-devel
participants (2)
-
"Timo B. Hübel"
-
Michael Snoyman