Unless you explicitly provide a ".sass" extension, Sass will default to 
adding a literal CSS import if it can't find the Sass file. That's why 
it's only throwing an error if you add ".sass." However, I would expect 
@import themes/default/constants to work. What version/revision are you 
using?

chris wrote:
> I am trying to import a file that contains all the constant values.
>
> I have three files that are locates in:
>   - public/stylesheets/sass/themes/default/constants.sass
>   - public/stylesheets/sass/themes/default/admin.sass
>   - public/stylesheets/sass/themes/default/public.sass
>
> The import statement, that is referencing the constants.sass file,
> within both the admin and public files is failing.
>
> When I use @import constants  (note the lack of the .sass extension.
> With the sass extension I get the same error as the second one shown
> below.)
>
> I get this error:
> ========================================================
> Sass::SyntaxError: Undefined constant: "!primary_color"
> on line 8 of /Users/chris/Documents/Projects/Rails/myapp/public/
> stylesheets/sass/themes/default/admin.sass
> ========================================================
>
> To get to line 8 that means that it didn't throw up on the @import
> statement on line 1, but it is still failing to find the value.  The !
> primary_color variable is declared in the constants file.  When I add
> the sass extension I get this error:
> ========================================================
> /*
> Sass::SyntaxError: File to import not found or unreadable:
> constants.sass
> on line 1 of /Users/chris/Documents/Projects/Rails/myapp/public/
> stylesheets/sass/themes/default/admin.sass
> 1: @import constants.sass
> 2:
> 3: /layout
> 4: #container
> 5:   :width 760px
> 6:   :margin 0 auto 20px
> 7:   #header
> ========================================================
>
> All of the following give me the same error as the later.
> @import public/stylesheets/sass/themes/default/constants.sass
> @import stylesheets/sass/themes/default/constants.sass
> @import sass/themes/default/constants.sass
> @import themes/default/constants.sass
> @import default/constants.sass
>
>
> What is it that I am doing wrong?
>
> Thanks for the help.
>
>
> >
>
>   


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