would the alternate syntax I suggested still have this problem ? I.e.
would you need the & to be able to specify properly ?

p
  text-align: justify
  :first-letter
    margin-left: 1em


On Apr 11, 11:35 pm, "Nathan Weizenbaum" <[EMAIL PROTECTED]> wrote:
> Pseudo-selectors, like :first-letter, are an interesting case. Even if Sass
> didn't use the beginning colon as an identifier for an attribute, the
> selector you'd end up getting would be "p :first-letter", which isn't what
> you want.
>
> There's a way to deal with this nicely, though. In trunk, you can use the
> ampersand character (&) to control exactly how the parent is used in the
> selector. The ampersand is literally replaced with the parent element. Your
> example, then, would be:
>
> p
>   :text-align justify
>   &:first-letter
>     :margin-left 1em
>
> Hope that helps!
> - Nathan
>
> On 4/11/07, Evgeny <[EMAIL PROTECTED]> wrote:
>
>
>
> > Greetings All,
>
> > A short example of what does not work :
>
> > p
> >   :text-align justify
> >   :first-letter
> >     :margin-left 1em
>
> > And a short example of how to make it work, nevertheless :
>
> > p
> >   :text-align justify
> > p:first-letter
> >   :margin-left 1em
>
> > This small example raises the question of how Sass supports CSS selectors
> > ... if sass would use a bit different syntax, with : coming after the
> > attribute and not before -- then there might not even be a problem at all.
> > But since the first example is something that I would expect to work - sass
> > probably needs some kind of 'css selector reserved words' knowledge, or
> > perhaps handle parameter-less selectors in a special way.
>
> > Regards,
>
> > - evgeny


--~--~---------~--~----~------------~-------~--~----~
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