diff --git a/TODO.md b/TODO.md new file mode 100644 index 00000000..82cc0ff1 --- /dev/null +++ b/TODO.md @@ -0,0 +1,2 @@ +* vendored plugins should override default plugins. + diff --git a/lib/compass/installers/template_context.rb b/lib/compass/installers/template_context.rb new file mode 100644 index 00000000..a86d9142 --- /dev/null +++ b/lib/compass/installers/template_context.rb @@ -0,0 +1,22 @@ +module Compass + module Installers + class TemplateContext + def self.ctx(*arguments) + new(*arguments).get_binding + end + def initialize(locals = {}) + @locals = locals + end + def get_binding + @locals.each do |k, v| + eval("#{k} = v") + end + binding + end + def config + Compass.configuration + end + alias configuration config + end + end +end \ No newline at end of file diff --git a/lib/compass/sass_extensions/functions/selectors.rb b/lib/compass/sass_extensions/functions/selectors.rb index fecaab73..34de7508 100644 --- a/lib/compass/sass_extensions/functions/selectors.rb +++ b/lib/compass/sass_extensions/functions/selectors.rb @@ -33,7 +33,10 @@ module Compass::SassExtensions::Functions::Selectors # #{append_selector(!selector, !to_append)} # width: 2px def append_selector(selector, to_append) - Sass::Script::String.new(selector.value.split(COMMA_SEPARATOR).map{|s| "#{s}#{to_append}"}.join(", ")) + ancestors = selector.value.split(COMMA_SEPARATOR) + descendants = to_append.value.split(COMMA_SEPARATOR) + nested = ancestors.map{|a| descendants.map{|d| "#{a}#{d}"}.join(", ")}.join(", ") + Sass::Script::String.new(nested) end end \ No newline at end of file