Skip to content

Commit 8f98cae

Browse files
committed
Merge branch 'main' into browser
* main: Split SilentComment nodes on empty lines in SCSS (sass#1945) Fix :has(+ &) (sass#1938)
2 parents 794f072 + 8dddcb7 commit 8f98cae

File tree

6 files changed

+26
-5
lines changed

6 files changed

+26
-5
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.62.1
2+
3+
* Fix a bug where `:has(+ &)` and related constructs would drop the leading
4+
combinator.
5+
16
## 1.62.0
27

38
* Deprecate the use of multiple `!global` or `!default` flags on the same

lib/src/ast/selector/list.dart

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,18 @@ class SelectorList extends Selector {
137137
}
138138
}
139139
} else if (newComplexes.isEmpty) {
140-
newComplexes.addAll(resolved);
140+
newComplexes.addAll(complex.leadingCombinators.isEmpty
141+
? resolved
142+
: resolved.map((resolvedComplex) => ComplexSelector(
143+
resolvedComplex.leadingCombinators.isEmpty
144+
? complex.leadingCombinators
145+
: [
146+
...complex.leadingCombinators,
147+
...resolvedComplex.leadingCombinators
148+
],
149+
resolvedComplex.components,
150+
complex.span,
151+
lineBreak: resolvedComplex.lineBreak)));
141152
} else {
142153
var previousComplexes = newComplexes;
143154
newComplexes = [

lib/src/parse/scss.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class ScssParser extends StylesheetParser {
151151
do {
152152
while (!scanner.isDone && !isNewline(scanner.readChar())) {}
153153
if (scanner.isDone) break;
154-
whitespaceWithoutComments();
154+
spaces();
155155
} while (scanner.scan("//"));
156156

157157
if (plainCss) {

pkg/sass_api/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 7.0.0
2+
3+
* Silent comments in SCSS that are separated by blank lines are now parsed as
4+
separate `SilentComment` nodes rather than a single conjoined node.
5+
16
## 6.3.0
27

38
* No user-visible changes.

pkg/sass_api/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ name: sass_api
22
# Note: Every time we add a new Sass AST node, we need to bump the *major*
33
# version because it's a breaking change for anyone who's implementing the
44
# visitor interface(s).
5-
version: 6.3.0
5+
version: 7.0.0
66
description: Additional APIs for Dart Sass.
77
homepage: https://github.com/sass/dart-sass
88

99
environment:
1010
sdk: ">=2.17.0 <3.0.0"
1111

1212
dependencies:
13-
sass: 1.62.0
13+
sass: 1.62.1
1414

1515
dev_dependencies:
1616
dartdoc: ^5.0.0

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sass
2-
version: 1.62.0
2+
version: 1.62.1
33
description: A Sass implementation in Dart.
44
homepage: https://github.com/sass/dart-sass
55

0 commit comments

Comments
 (0)