It was intentionally taken away because, as I understand it, it was never intended to work.
I respect that you think this is a cleaner implementation, but I disagree. I think it's very confusing. Mixins are how you indicate that a particular block of styles are going to be nested into other selectors. Why do we need two mechanisms for mixing? If I open up index_page_nested_rules.sass there's nothing about that file that tells me how it's going to be used except, maybe, a comment if you thought to add one. If I see one or more mixins defined there, I understand, I have to go looking for where they are used. Perhaps there is some use case I haven't considered, so I'll welcome you to state your case for why you think this approach is better than @import + mixins. Chris On Mon, Dec 14, 2009 at 10:17 AM, Tim Underwood <[email protected]>wrote: > In Haml/Sass 2.0.9 I'm able to do something like this: > > .index_page > @import index_page_nested_rules.sass > > .results_page > @import results_page_nested_rules.sass > > And then everything in index_page_nested_rules.sass was nested within > my index_page class. But in Haml/Sass 2.2.15 I get this error: > > "Sass::SyntaxError: Import directives may only be used at the root of > a document." > > Was support for this intentionally taken away? Is there another way > to accomplish the same thing? Mixins kind of work but aren't as clean > as the nested @import's. > > Thanks, > > -Tim > > -- > > 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] <haml%[email protected]>. > For more options, visit this group at > http://groups.google.com/group/haml?hl=en. > > > -- 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.
