Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix selector unification ordering #2737

Merged
merged 2 commits into from
Nov 19, 2018
Merged

Fix selector unification ordering #2737

merged 2 commits into from
Nov 19, 2018

Conversation

glebm
Copy link
Contributor

@glebm glebm commented Nov 18, 2018

Introduces explicit order for selector unification and simplifies the implementation.

Spec sass/sass-spec#1311
Fixes #2681

Introduces explicit order for selector unification and simplifies the
implementation.

Fixes sass#2681
@glebm
Copy link
Contributor Author

glebm commented Nov 18, 2018

In the first commit (880cd26) I added a function that returns the unification order by matching on typeid.

The second commit (474e9a7) adds a unification_order method to the Selector class instead.

I prefer the second one even though the class hierarchy is not ideal for this (because unification_order is not defined for a few selector types).

@xzyfer
Copy link
Contributor

xzyfer commented Nov 19, 2018

Added tests, test metadata, and kicked off CI

@xzyfer
Copy link
Contributor

xzyfer commented Nov 19, 2018

I agree the final result is preferable.

@xzyfer xzyfer merged commit 3e60b12 into sass:master Nov 19, 2018
@glebm glebm deleted the unify branch November 19, 2018 10:37
@glebm glebm mentioned this pull request Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants