Skip to content

Commit

Permalink
Properly unify the universal selector. (#2316)
Browse files Browse the repository at this point in the history
Closes #2247
  • Loading branch information
nex3 committed Jun 16, 2017
1 parent 9c18963 commit 2e20c35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc-src/SASS_CHANGELOG.md
Expand Up @@ -5,6 +5,8 @@

## 3.4.25 (Unreleased)

* Fix a bug where `*` wouldn't always be eliminated during selector unification.

### Deprecations -- Must Read!

* Extending compound selectors such as `.a.b` is deprecated. This never followed
Expand Down
1 change: 1 addition & 0 deletions lib/sass/selector/simple.rb
Expand Up @@ -72,6 +72,7 @@ def eql?(other)
# by the time extension and unification happen,
# this exception will only ever be raised as a result of programmer error
def unify(sels)
return sels.first.unify([self]) if sels.length == 1 && sels.first.is_a?(Universal)
return sels if sels.any? {|sel2| eql?(sel2)}
sels_with_ix = Sass::Util.enum_with_index(sels)
if !is_a?(Pseudo) || (sels.last.is_a?(Pseudo) && sels.last.type == :element)
Expand Down

0 comments on commit 2e20c35

Please sign in to comment.