diff --git a/CHANGELOG.md b/CHANGELOG.md index e7ab81f9c..74dd0ba27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.62.1 + +* Fix a bug where `:has(+ &)` and related constructs would drop the leading + combinator. + ## 1.62.0 * Deprecate the use of multiple `!global` or `!default` flags on the same diff --git a/lib/src/ast/selector/list.dart b/lib/src/ast/selector/list.dart index 20f2b77b5..a45c0c07a 100644 --- a/lib/src/ast/selector/list.dart +++ b/lib/src/ast/selector/list.dart @@ -137,7 +137,18 @@ class SelectorList extends Selector { } } } else if (newComplexes.isEmpty) { - newComplexes.addAll(resolved); + newComplexes.addAll(complex.leadingCombinators.isEmpty + ? resolved + : resolved.map((resolvedComplex) => ComplexSelector( + resolvedComplex.leadingCombinators.isEmpty + ? complex.leadingCombinators + : [ + ...complex.leadingCombinators, + ...resolvedComplex.leadingCombinators + ], + resolvedComplex.components, + complex.span, + lineBreak: resolvedComplex.lineBreak))); } else { var previousComplexes = newComplexes; newComplexes = [ diff --git a/pkg/sass_api/CHANGELOG.md b/pkg/sass_api/CHANGELOG.md index 4241db909..0f02232d3 100644 --- a/pkg/sass_api/CHANGELOG.md +++ b/pkg/sass_api/CHANGELOG.md @@ -1,3 +1,7 @@ +## 6.3.1 + +* No user-visible changes. + ## 6.3.0 * No user-visible changes. diff --git a/pkg/sass_api/pubspec.yaml b/pkg/sass_api/pubspec.yaml index a2877c77b..f84003075 100644 --- a/pkg/sass_api/pubspec.yaml +++ b/pkg/sass_api/pubspec.yaml @@ -2,7 +2,7 @@ name: sass_api # Note: Every time we add a new Sass AST node, we need to bump the *major* # version because it's a breaking change for anyone who's implementing the # visitor interface(s). -version: 6.3.0 +version: 6.3.1-dev description: Additional APIs for Dart Sass. homepage: https://github.com/sass/dart-sass @@ -10,7 +10,7 @@ environment: sdk: ">=2.17.0 <3.0.0" dependencies: - sass: 1.62.0 + sass: 1.62.1-dev dev_dependencies: dartdoc: ^5.0.0 diff --git a/pubspec.yaml b/pubspec.yaml index c9fae8723..32658cac4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: sass -version: 1.62.0 +version: 1.62.1-dev description: A Sass implementation in Dart. homepage: https://github.com/sass/dart-sass