Hi,
I had a need / want / idea for Sass, and rather than be a butt and
just ask for it, I decided to write a patch. Take or leave. (Or leave
comments.)
I wanted some better way of sharing attributes than the dreaded ","
selector. So I implemented mixins:
// Mixins are declared at the top level. Just put an indented block
after the "="
!detail =
// You can actually nest full Sass fragments inside here, if you
feel so inclined...
:color gray
:font-size smaller
.instructions
// Presto! It's merged!
!detail
:font-style italic
#timeout_error
!detail
:border solid 1px black
The implementation just copies that !detail fragment into each block
in which it's referenced, thus causing CSS bloat. In other words, it
generates:
.instructions { color: gray; font-size: smaller; font-style: italic; }
#timeout_error { color: gray; font-size: smaller; border: solid 1px
black; }
An ambitious hacker could have it instead generate:
.instructions, #timeout_error { color: gray; font-size: smaller; }
.instructions { font-style: italic; }
#timeout_error { border: solid 1px black; }
Probably wouldn't be that hard to do, but it's 2:30 AM, and I have to
work today.
Any ways, <a href="http://groups.google.com/group/haml/web/sass-
mixin.patch">voici</a>. Thoughts?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---