Skip to content

Commit 655b55c

Browse files
authoredOct 27, 2022
Indent comma-separated multiline selectors inside @media queries (#1814)
* Indent comma-separated multiline selectors inside @media queries * update pubspec and changelog
1 parent 6e670ef commit 655b55c

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed
 

‎CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.55.1
2+
3+
* Fix indentation for selectors that span multiple lines in a `@media` query.
4+
15
## 1.55.0
26

37
* **Potentially breaking bug fix:** Sass numbers are now universally stored as

‎lib/src/visitor/serialize.dart

+3-2
Original file line numberDiff line numberDiff line change
@@ -1240,6 +1240,7 @@ class _SerializeVisitor
12401240
_buffer.writeCharCode($comma);
12411241
if (complex.lineBreak) {
12421242
_writeLineFeed();
1243+
_writeIndentation();
12431244
} else {
12441245
_writeOptionalSpace();
12451246
}
@@ -1318,7 +1319,7 @@ class _SerializeVisitor
13181319

13191320
if (_isTrailingComment(child, previous ?? parent)) {
13201321
_writeOptionalSpace();
1321-
_withoutIndendation(() => child.accept(this));
1322+
_withoutIndentation(() => child.accept(this));
13221323
} else {
13231324
_writeLineFeed();
13241325
_indent(() {
@@ -1431,7 +1432,7 @@ class _SerializeVisitor
14311432
}
14321433

14331434
/// Runs [callback] without any indentation.
1434-
void _withoutIndendation(void callback()) {
1435+
void _withoutIndentation(void callback()) {
14351436
var savedIndentation = _indentation;
14361437
_indentation = 0;
14371438
callback();

‎pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sass
2-
version: 1.55.0
2+
version: 1.55.1-dev
33
description: A Sass implementation in Dart.
44
homepage: https://github.com/sass/dart-sass
55

0 commit comments

Comments
 (0)
Please sign in to comment.