The workaround is actually the better way to do it anyway...
Chris grokked through this on IM.
>>> Sass
!argument = "asdf"
body##{!argument}
#foo
color: blue
========
body#asdf #foo {
color: blue; }
<<< CSS
Thanks Chris!
On Nov 13, 2009, at 3:59 PM, Chris Eppstein wrote:
> Looks like you found a bug. here's a few more (simpler) cases of
> weirdness:
>
> >>> Sass
> !argument = "asdf"
> !bar = "##{!argument}"
> body#{!bar}
> #foo
> color: blue
> =======
> body##{!argument} #foo {
> color: blue; }
> <<<< CSS
>
> >>>> Sass
> !argument = "asdf"
> !bar = "#" + !argument
> body#{!bar}
> #foo
> color: blue
> ========
> body"#"asdf #foo {
> color: blue; }
> <<<< CSS
>
> Plus I get
> DEPRECATION WARNING:
> On line 2, character 8
> Implicit strings have been deprecated and will be removed in version
> 2.4.
> '"#"' was not quoted. Please add double quotes (e.g. ""#"").
>
>
> $ sass -i
> >> !bar = "#"
> DEPRECATION WARNING:
> On line 1, character 8
> Implicit strings have been deprecated and will be removed in version
> 2.4.
> '"#"' was not quoted. Please add double quotes (e.g. ""#"").
>
>
> On Fri, Nov 13, 2009 at 3:45 PM, Lorin Tackett <[email protected]
> > wrote:
> Oops, forgot the bang on the !layout_selector... but only in my code
> example...
>
> @else
> body#{!layout_selector}
> @if !name == "three-column"
>
> There is no error, the output I get is the rules for each layout
> section, but without the body#layout_selector selector... sass just
> removes it and outputs starting at #primary.
>
> On Nov 13, 2009, at 3:41 PM, Lorin Tackett wrote:
>
> > I did this successfully with classes, but with ID's it chokes,
> > presumably on the syntax.
> >
> > in application.sass I have
> >
> > +layout(default)
> > +layout(three-column)
> > +layout(two-column)
> >
> > in _layouts.sass I have
> >
> > = layout(!name = false)
> > !layout_selector = "##{!name}"
> >
> > @if !name == "default
> > body
> > #primary
> > +column(18)
> > #primary
> > +column(8, true)
> > @else
> > body#{layout_selector}
> > @if !name == "three-column"
> > #primary
> > +column(8)
> > #secondary
> > +column(8)
> > #tertiary
> > +column(8, true)
> > @if !name == "one-column"
> > #primary
> > +column(24, true)
> >
> > Is there any way to do this?
>
> --
>
> You received this message because you are subscribed to the Google
> Groups "Haml" group.
> To post to this group, send email to [email protected].
> For more options, visit this group at http://groups.google.com/group/haml?hl=
> .
>
>
>
>
> --
>
> You received this message because you are subscribed to the Google
> Groups "Haml" group.
> To post to this group, send email to [email protected].
> For more options, visit this group at http://groups.google.com/group/haml?hl=
> .
--
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/haml?hl=.