"Nice to have" and "worth the trouble of implementing" are definitely
not the same thing, especially if it's tricky as Chris says :-)
I managed to achieve what I wanted using a totally different approach:
---- SASS ----
=column_size(!size, !padding=1%)
width = !size - !padding
padding:
right = !padding
=equal_width_columns(!count)
.column
+column_size(100% / !count)
.floating_columns
overflow: auto
.column
float = left
#container
+equal_width_columns(3)
.column
more-properties: foo
--------------
---- HAML ----
#container.floating_columns
#first.container
First!
#second.container
Second!
#Third.container
Thrid!
--------------
I think this is pretty elegant; everything but the bottom SASS block
is reusable, and all I have to do is make sure I have the number of
columns right in the call to equal_width_columns.
There may still be some benefit to having the ancestor-selector, but
this solution works well for me in this particular circumstance.
By the way, let me take this opportunity to thank you guys for making
SASS into the incredible language that it is. This is what CSS should
have been from the start. :-)
Craig Walker
SoftCraft Development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---