p
text-align: justify
:first-letter
margin-left: 1em
On Apr 11, 11:35 pm, "Nathan Weizenbaum" <nex...@gmail.com> 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
>
- Nathan
i understand u dont want to start providing alternate syntax's at this
stage in the project, - but i'd like to give it a go :)
As for inclusion in trunk, I want to wait for Hampton to weigh in to say
for sure, but I'd be fine with adding it if you can make a patch.
- Nathan
do you have any ideas where we could put a configuration switch to
turn in on/off ?
One simple way to get around the ambiguity about pseudo-selectors would
be to require that attributes have a space after the colon.
- Nathan
only one problem with lines like :
a:link, a:visited
but I think it should be easy to fix