The first one is a valid error. When you type "sans-serif", Sass thinks 
you're trying to subtract the string "serif" from the string "sans", 
which makes no sense. In order to get it not to parse the hyphen as a 
minus operator, wrap the value in quotes, like so:

!fontFamily = Tahoma, Verdana, Helvetica, Arial, "sans-serif"

This makes Sass parse it as a literal string.

The second error shouldn't occur, but only because it should be replaced 
by a more informative error. It suffers from the same error as the above 
example, as well as an additional one: the quotes are being interpreted 
as creating strings. If you want literal quotes, you have to escape them 
with a backslash, like so:

!fontFamily = \"Lucida Grande\", \"Lucida Sans Unicode\", Tahoma, Verdana, 
Helvetica, Arial, "sans-serif"

Hope that helps.

- Nathan

Spongy wrote:
> When using a sass constant to store a specific font family the parser
> fails. There are two different types of error depending on the list of
> font families.
>
>     !fontFamily = Tahoma, Verdana, Helvetica, Arial, sans-serif
>
>     body
>       :font-family= !fontFamily
>
> the above sass will generate the following error when processed
> `(sass):1: Undefined operation: "Tahoma, Verdana, Helvetica, Arial,
> sans minus serif" (Sass::SyntaxError)`
>
>
> The other error is caused when you have two quoted fonts in the list.
>
>     !fontFamily = "Lucida Grande", "Lucida Sans Unicode", Tahoma,
> Verdana, Helvetica, Arial, sans-serif
>
>     body
>       :font-family= !fontFamily
>
> the above will generate an error of
> `vendor/plugins/haml/bin/../lib/sass/constant.rb:174:in
> `insert_constant': undefined method `[]' for :concat:Symbol
> (NoMethodError)`
>
> - Spongy
>
>
> >
>
>   


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