class Sass::Selector::Sequence
def unify(other)
-
(Sass::SyntaxError)
- If this selector cannot be unified.
Returns:
-
(CommaSequence, nil)
- The unified selector, or nil if unification failed.
Parameters:
-
other
(Sequence
) --
def unify(other) base = members.last other_base = other.members.last return unless base.is_a?(SimpleSequence) && other_base.is_a?(SimpleSequence) return unless (unified = other_base.unify(base)) woven = weave([members[0...-1], other.members[0...-1] + [unified]]) CommaSequence.new(woven.map {|w| Sequence.new(w)}) end