motion-prime/views/styles.rb in motion-prime-0.3.3 vs motion-prime/views/styles.rb in motion-prime-0.4.0
- old
+ new
@@ -20,14 +20,16 @@
else
raise "No style rules specified for `#{names.join(', ')}`. Namespace: `#{@namespace}`" unless options
parent = options.delete(:parent)
namespace = options.delete(:parent_namspace) || @namespace
parent ="#{namespace}_#{parent}".to_sym if namespace
+ mixins = Array.wrap(options.delete(:mixins)).map { |mixin_name| :"_mixin_#{mixin_name}" }
names.each do |name|
name = "#{@namespace}_#{name}".to_sym if @namespace
@@repo[name] ||= {}
@@repo[name].deep_merge!(self.class.for(parent)) if parent
+ @@repo[name].deep_merge!(self.class.for(mixins)) if mixins.present?
@@repo[name].deep_merge! options
end
end
end
\ No newline at end of file