# File lib/sass/selector/sequence.rb, line 109 def do_extend(extends, parent_directives, replace, seen, original) extended_not_expanded = members.map do |sseq_or_op| next [[sseq_or_op]] unless sseq_or_op.is_a?(SimpleSequence) extended = sseq_or_op.do_extend(extends, parent_directives, replace, seen) # The First Law of Extend says that the generated selector should have # specificity greater than or equal to that of the original selector. # In order to ensure that, we record the original selector's # (`extended.first`) original specificity. extended.first.add_sources!([self]) if original && !has_placeholder? extended.map {|seq| seq.members} end weaves = Sass::Util.paths(extended_not_expanded).map {|path| weave(path)} trim(weaves).map {|p| Sequence.new(p)} end