Actually I'm very interested in this.  I've had a couple of parts in
my
Sass files where I've repeated myself unnecessarily and would love
this
functionality.  I can provide some examples if you want.


On Jun 3, 4:16 am, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
> Very interesting. I've sort of had something like this in the back of my
> mind since we started working on Sass. I never really thought about it
> up front, though, so I guess now is the time to do that.
>
> When I brought this up with Hampton, he essentially said "Meh, I don't
> use stuff like that, but put it in if you want to." That made me realize
> that this isn't really something I've been itching for, either. It seems
> like it /should/ be available just by virtue of Sass being friendlier
> CSS... but when you get right down to it that's not a really good
> argument for including it. It seems to me, when I write CSS, I tend not
> to use any sort of abstractable structure of giving certain rules the
> same attributes (at least not consciously). When I need something
> logically grouped like that, I almost always use classes or comma
> separation (which is fantastically well-supported in Sass, thanks to
> svenax). I get the sense that this sort of abstraction would just not be
> useful.
>
> Of course, I could be wrong. Thus, I'm asking you, both twifkak in
> particular and the Sassy community as a whole: where, if at all, do you
> think this would be useful?
>
> - Nathan
>
> twifkak wrote:
> > 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to