-
Notifications
You must be signed in to change notification settings - Fork 357
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
Deprecate bogus combinators #1740
Conversation
44a8ea2
to
015599a
Compare
const AnySelectorVisitor(); | ||
|
||
bool visitComplexSelector(ComplexSelector complex) => complex.components | ||
.any((component) => visitCompoundSelector(component.selector)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why this calls visitCompoundSelector
directly instead of component.selector.accept(this)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just avoids an unnecessary layer of calls, especially since highly polymorphic calls like accept()
tend to be particularly difficult for JIT VMs to optimize.
dependency_overrides: | ||
source_span: | ||
git: | ||
url: https://github.com/dart-lang/source_span |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this PR also be marked as blocked on dart-lang/source_span#86?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't release with a Git dependency, but it's fine to have one for -dev
versions.
var selector = pseudo.selector; | ||
if (selector == null) return false; | ||
|
||
// The CSS spec specifically allows leading combinators in `:has()`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CSS spec allows 1 leading combinator.
See sass/sass#3340
See #1727
See sass/sass-spec#1803
Blocked on #1741